cancel
Showing results for 
Search instead for 
Did you mean: 

Expecting a PDF file from HTTP download action but got something else

JayMappus
Deputy Chef III
Deputy Chef III

Hi,

I've got an HTTP action step that supposedly GETs from the app SignNow a downloaded document. Yet what it returns is not what I expected, neither a public link to the file nor a downloaded file as far as I can tell. Can you please help me determine what I'm doing wrong? Below is what I get back which has an encouraging status code of 200 but I don't know how to get to the PDF file I'm expecting. SignNow's API documentation for it is here https://docs.signnow.com/docs/signnow/reference/operations/get-a-document-download . 

Thank you

J

{
  Status code: 200,
  Error: ,
  Headers:
{
    Date: 2023-08-15,
    Content type: application/pdf,
    Content length: 294858,
    Connection: keep-alive,
    Server: openresty,
    X ratelimit limit: 1000,
    X ratelimit remaining: 997,
    X ratelimit reset: 1692064800,
    Cache control: public,
    Last modified: 2023-08-15,
    Content disposition: attachment; filename="Jay Testautoupload1211 - Auto Retainer Agreement with McDo.pdf",
    Accept ranges: bytes,
    Strict transport security: max-age=31536000; includeSubDomains
  },
  Body: 0x255044462d312e330a25bff7a2fe0a312030206f626a0a3c3c202f5061676573203320302052202f54797065202f436174616c6f67202f56657273696f6e202f312e33203e3e0a656e646f626a0a322030206f626a0a3c3c202f43726561746f722028616972536c61746520696e632e29202f50726f64xxxxxxxx…(294730 bytes more),
  Response: 0x255044462d312e330a25bff7a2fe0a312030206f626a0a3c3c202f5061676573203320302052202f54797065202f436174616c6f67202f56657273696f6e202f312e33203e3e0a656e646f626a0a322030206f626a0a3c3c202f43726561746f722028616972536c61746520696e632e29202f50726f647563xxxxxxx…(294730 bytes more)
}

1 ACCEPTED SOLUTION

chris-wiechmann
Workato employee
Workato employee

Hi @JayMappus

Based on what I can see, this is a PDF-Document within the response body of your HTTP-Request. Now, you have to extract it into an attribute (you know, create a proper response schema for the HTTP-Request) and then save it into a file.

Cheers,
Chris 

View solution in original post

2 REPLIES 2

chris-wiechmann
Workato employee
Workato employee

Hi @JayMappus

Based on what I can see, this is a PDF-Document within the response body of your HTTP-Request. Now, you have to extract it into an attribute (you know, create a proper response schema for the HTTP-Request) and then save it into a file.

Cheers,
Chris 

Thank you Chris. Per your advice I found it in the "Body". I guess I was expecting something else. Thanks for getting me out of a jam.

J