Send file throu HTTP Post request
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
23-10-18 07:45 PM
Hi,
I know this will be a very general question but I need a direction how to continue with this - I try to send a file via API using VBO 'Utility - HTTP', action 'Post'. I know I should very probably convert the file to binary, which I have done, but how to 'append' it to the request? There is an input of the action called 'Post Data' but it is a collection and I do not know how to structure it.
The communication via http works since I get a customized error mesasge that I forgot to append a file.
Thanks for any hints.
Regards,
Michal Klodner
3 REPLIES 3

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-10-18 12:31 PM
Hi Michal,
I have a similar problem.
I gave up sending the file using BluePrism and used the command line to send the file instead.
Maybe not the cleanest of solutions, but it works.
Regards,
Rudi
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-10-18 08:12 PM
> There is an input of the action called 'Post Data' but it is a collection and I do not know how to structure it.
In general, open HTTP VBO and see how it works. (Or you can always create your own VBO)
Basically ""Post Data"" should contain one row, rest is ignored. Get Body stage builds a string from it, for each column in that row in it adds urlencoded ""ColumnName=Value"" pairs separated by &
Binary files are normally sent by browser as multipart/form-data instead of application/x-www-form-urlencoded, because latter adds significant overhead for big binary files - it looks like you'd have to create your own action for multipart/form-data, if you need it.
Nevertheless, server should be able to accept application/x-www-form-urlencoded file too, which can be sent with HTTP VBO... just be prepared that your request might end up like 2-3 times the size of the actual file.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-01-19 01:58 AM
Off topic, how do you convert the file name to Binary?
Pranav
