API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to download PDF file through response in IBM API Connect

  • 1.  How to download PDF file through response in IBM API Connect

    Posted Tue March 12, 2024 01:03 PM
      |   view attached

    Hi,

    I want to download pdf through response in IBM API Connect. I am consuming third party URL in API Connect. While invoking API I'm getting "Failed to load pdf" as an error. I'm passing "application/pdf" as Content-Type in request headers. Also, I'm able to see pdf file as attachment in response headers.

    Please provide a solution for this issue.



    ------------------------------
    Abhishek Jagtap
    ------------------------------


  • 2.  RE: How to download PDF file through response in IBM API Connect

    Posted Wed March 13, 2024 01:35 AM

    Content-type is the type of content you are sending, if it's a GET then you're not sending any content and shouldn't be sending that header as it contravenes the rfc. I think you mean the Accept header which the client sends to tell the api what format it wants to receive.

    in an openapi file we never explicitly document either of those because openapi is controlled through the produces and consumes attributes. See the openapi spec for more info.



    ------------------------------
    Chris Dudley
    ------------------------------