I had to send a POST request to a Cloud Platform including a zipped csv file. At the moment I´m using Postman for this, and it goes all correctly. On the Webserver it is not possible to install Postman, so I have to use Powershell for this. I have a problem to find out how the body is to insert in the script:
The Correct Postman post - on the "Code snippet" - with CURL Postman says i have to make it like this:
curl --location --request POST 'https://api.../v..../xxx.csv' \
--header 'Content-Type: application/octet-stream' \
--header 'Ocp-Apim-Subscription-Key: xxxxxx' \
--data-binary '....../brunico.zip'**
on Postman the Code snippet for Powershell ist not fully described, for the body is written: ...file contents here...
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/octet-stream")
$headers.Add("Ocp-Apim-Subscription-Key", "xxxxxx")
$body = "<file-contents-here>"***
$response = Invoke-RestMethod 'https://api.../v..../xxx.csv' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json**
how do I insert the zip file in the body?