Getting header from web api post response

Hello everyone,

I’m currently working on a project where I need to interact with the Azure API, which necessitates both POST and GET requests.

As part of this process, I’m using the Thunkable’s Web API block to send a POST request and attempting to retrieve the ‘Operation-Location’ header from the response (response.headers[“Operation-Location”]).

However, it appears that I’m only receiving the status ‘202’ and a ‘null’ response. From what I understand, Thunkable’s Web API block allows for access to the body of the response (which contains the actual data returned by the server), but not the headers, which is what I’m particularly interested in.

Attached is a screenshot of my current block setup for reference. I would appreciate any insights or guidance on how I could access the response headers in Thunkable. Thank you in advance for your assistance.

Thanks!

Hello @hauleslie3tf
A solution will be to use a Web Viewer component and an HTL file instead of the Web API component.
You can find an example shared here: Getting a header from post response? - #7 by mcdonaldzacharyaj3o6

1 Like