Question

Post method return a hydrated response | How to access the response header ?

  • 15 November 2022
  • 1 reply
  • 680 views

HI, 
I'm integrating Zoho bookings with fiken API but I'm facing a problem. 
 when I use a Post method in response it gives me a file with a hydrated URL or something like that:

file
hydrate|||.eJwtj7EOgyAURf_lzZpCqVTdurVbtw5NQwAfDVHBCKYxxn8vGtdzb87NXUB7F9FFEecBoYYHZGBdiNJpFLZJ5IXq7n17e26RnkL0_RRw3MOyKhg_lxlIrf2ULAckRZGgsdg1wsl-ExvbYUiG9ifHb4B62YkYvE37YwLvBVqcUzOwE624VESWuUZU-YWSa14pynI0hPKGMW5QJteh3i5IHQOsn3X9A0ikQ2k:1ouaaS:D7YX7fBEG2iIVELA0-rr2z4lD4I|||hydrate  

https://drive.google.com/file/d/1ZFMPbfgYNH0oun9VLGAWItEPF3sfxnsZ/view?usp=sharing

but I want to get the response header  for further progress 
https://drive.google.com/file/d/1wTbsrUV2wR5spcC6S1KV2O6xa01J6vmE/view?usp=sharing

how i can solve these problems plz let me know. 
Thank you  


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 2
Badge +1

Hi @peter123! 👋 

when I use a Post method in response it gives me a file with a hydrated URL

When a Zapier app integration makes an API request to an endpoint that returns a file, the Zapier platform  won’t actually download the file unless it is used (selected) in a following action step in a Zap. Until that time, an internal “dehydration pointer” is returned, i.e. the hydrate||| string.

You can read more about dehydration/hydration here: https://platform.zapier.com/cli_tutorials/hydration

I want to get the response header for further progress 

You can get access to response headers using the getHeader(key) method of the response object: https://platform.zapier.com/cli_docs/docs#http-response-object

If you’re building your app using the UI (visual builder), you can switch to “code mode” to write code that accesses the response object, such as the getHeader(key) method: https://platform.zapier.com/docs/faq#how-does-code-mode-work

Could you give that a try and let us know how things go?