Skip to main content

Hi all.

Maybe someone has already encountered the same problem, when the headers are ignored, and I always get "text/plain;charset=UTF-8".

The body was received as expected, but the headers were not.

const perform = async (z: ZObject, bundle: Bundle) => {
const response = await z.request({
method: "POST",
url: API_URL(bundle),
// headers: {
// "content-type": "application/json"
// },
headers: {
"content-type": "application/x-www-form-urlencoded",
"some-header": "exist",
},
// json
// if `body` is an object, it'll automatically get run through JSON.stringify
// if you don't want to send JSON, pass a string in your chosen format here instead
body: JSON.stringify({
access: `{{bundle.inputData.access}}`,
account: `{{bundle.inputData.account}}`,
summary: `{{bundle.inputData.summary}}`,
}),
// body: {
// access: `{{bundle.inputData.access}}`,
// account: `{{bundle.inputData.account}}`,
// summary: `{{bundle.inputData.summary}}`
// }
});

// this should return a single object
return response.data;
};

I've already checked a bunch of options, but this case is still not closed

I'll be grateful for any advice

Hi @Alex Ilkevych 

If you are building a Zap app integration using the Zapier Developer Platform, it is best to post your topic in this category: Developer Zone

https://community.zapier.com/p/developer-zone


Hi @Alex Ilkevych,

 

I transferred this post to our Developer zone for our Developer team to discuss your concern. Thank you.


Issue was solved. Headers were rewritten in another place in the code. It’s related to the internal code of current ZAP


Reply