Attach a file on a HTTP Request

Attach a file on a HTTP Request

Hi guys,

Is there any way to attach a binary file on a HTTP Request (Post or Put)?

I'm trying to sort this out using HTTPRequestHandler extension but I'm not getting any luck on this.

Hi Carlos,

Have you tried using the PostRequest_AddBinaryArgument action under the HTTPRequestHandler extension?

You can declare a variable of type Binary Data to hold the arguments then call the PostRequest_Submit, passing the PostRequest_AddBinaryArgument.ArgumentsOut to its Arguments parameter.

Though above works only for POST method. I can't seem find any counterpart for the GET method since it is using Text datatype for the arguments. So my guess would be to convert by using either BinaryDataToText or BinaryToBase64 action (under BinaryData extension) before passing to GetRequest_AddArgument.


I've tried that but it seems that it hads the argument to the query string instead of attach a file on the http request body,