Homelab, Linux & ABAP (~˘▾˘)~
 

[VSC] Post form-data via VSC Rest-API Client

Next to the .http file in the same folder, place your .env for hostname and authorization and the file you want to upload.
The parameter name="file" stands for the key that the files should belong to.

### Post form-data
POST {{$dotenv hostname}}/my/endpoint HTTP/1.1
Authorization: Basic {{$dotenv auth_in_base64}}
Content-Type: multipart/form-data; boundary=boundary
Accept: */*

--boundary
Content-Disposition: form-data; name="file"; filename="image.png"
Content-Type: image/png

< ./image.png

--boundary--

[CAP] UploadSet http test file

How to create an uploadSet in combination with a CAP backend: https://blogs.sap.com/2021/08/18/my-journey-towards-using-ui5-uploadset-with-cap-backend/

You can test the uploadSet CAP backend part using these http calls:

### Create file
# @name file
POST http://localhost:4004/v2/admin/Files
Authorization: Basic admin:
Content-Type: application/json

{
    "mediaType": "image/png",
    "fileName": "picture.png",
    "size": 1000
}

### Fill Variable from Response
@ID = {{file.response.body.$.d.ID}}

### Upload Binary PNG content
PUT http://localhost:4004/v2/admin/Files({{ID}})/content
Authorization: Basic admin:
Content-Type: image/png

< ./picture.png

### Get uploaded png
GET http://localhost:4004/v2/admin/Files({{ID}})/content
Authorization: Basic admin:

The picture.png file must be in the same folder as the http test file.

[Git] Error on Windows using VSCode Dev Container

After connecting to a local dev container using Visual Studio Code and trying to clone a private project from Github I got the following error:

Cloning into 'myProject'...
warning: url has no scheme: helperselector
fatal: credential url cannot be parsed: helperselector

The only way I could remove this error was deleting the helperselector settings. So open the git config with:

git config --edit --global

and remove the the helperselector block (the first two lines). You will now get asked again for your credentials when cloning a project.

[VSC] Extensions

Open-source registry for VS Code extensions: https://open-vsx.org/

Coden

https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2
https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons
https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv

Git

https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph

Markdown

https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
https://marketplace.visualstudio.com/items?itemName=ban.spellright

Docker

https://marketplace.visualstudio.com/items?itemName=formulahendry.docker-explorer

WSL

https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl