24-07-19 10:41 PM
Answered! Go to Answer.
22-05-20 04:53 PM
22-05-20 06:04 PM
11-06-20 04:00 PM
30-07-20 01:14 AM
31-07-20 06:30 AM
31-07-20 05:16 PM
@Bimal Sebastian
Looking in Postman at the headers needed for the API it has the following needed headers. Can you shed light on what headers are included as part of the API integration for sending files or file for the body of a POST?
We can easily get the number of bites using a calculation and we can set the Content-Type header easily, however is Content-Length sent automatically or can we set it? Knowing what headers are sent or possible to send would be helpful. If needed I can include the Request Headers and Request Body from postman where it worked minus authentication items.
31-07-20 05:28 PM
Think I'm starting to understand. Looking at the raw log from Postman I'm seeing the following.
Content-Type: multipart/form-data; boundary=--------------------------035755082283824938336703
Content-Length: 1179190
----------------------------035755082283824938336703
Content-Disposition: form-data; name="file"; filename="1718367-2019-1231-MID; 1040.pdf"
<1718367-2019-1231-MID; 1040.pdf>
----------------------------035755082283824938336703--
So would I want this as the body template?
[boundary]
Content-Disposition: form-data; name="file"; filename="[filename]"
[filedata as binary]
[boundary]--
And if so then add these headers to the action?
Content-Type: multipart/form-data; boundary=[boundary]
Content-Length: [length of file binary]
Apologize for all the questions but I feel like I'm on the edge of understanding.
31-07-20 08:20 PM
Ok I've set this up as my template.
Content-Length: [Content Length]
[Boundary]
Content-Disposition: form-data; name="file"; filename="[File Name]"
[File Data]
[Boundary]--
I've also added these headers
Content-Type multipart/form-data; boundary=[Boundary]
Cache-Control no-cache
When I run it I'm getting this error.
Unexpected error Error during Web API HTTP Request
HTTP Status Code: 400
HTTP Response Content: {"key":"ERROR_HAS_OCCURRED","value":"Unexpected end of MIME multipart stream. MIME multipart message is not complete."}
Here's what I have from Postman.
Cache-Control: no-cache
Host: api.thomsonreuters.com
Content-Type: multipart/form-data; boundary=--------------------------035755082283824938336703
Content-Length: 1179190
----------------------------035755082283824938336703
Content-Disposition: form-data; name="file"; filename="1718367-2019-1231-MID; 1040.pdf"
<1718367-2019-1231-MID; 1040.pdf>
----------------------------035755082283824938336703--
Not seeing what I'm getting wrong on this.
31-07-20 11:30 PM
04-08-20 02:20 PM