Curl --data-binary in HTTP Request Activity

Good day.

Is there a way that the following can be populated in the HTTP Request.
curl -X PUT “https://…” --data-binary @bob.pdf

I assume that the file is converted to binary and then PUT via the API but the json simply shows @bob.pdf as ‘data’.

Thanks
Ricardo

it depends on the target endpoint on how it is expecting the binary file provided. Maybe it is expecting in the request body in form of base64 coded string. Just inverstigate the endpoint docu / api reference

Thanks for the response…

So, I’ve configured it as follows:
endpoint: https AWS S3 bucket
Method = PUT

The thing I don’t get is how to populate the --data-binary part. I guess it goes into the json body but it’s not a name:value pair.

Usually it’s something like {“filename”:“bob1.txt”}.

The curl to json converter says it should be {“@bob1.pdf”": “”} which doesn’t make sense.

Base64 coded string is text but i think it must be binary, how would i configure the HTTP request activity.

What’s also driving me crazy is that CURL for Windows works but when i open the Command Prompt from UiPath, it doesn’t recognise curl :confused:

I guess if I could automate the curl commands somehow rather than use the HTTP request then that could work although not elegant.

A person must use application/octet-string.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.