let payload = {
"user": user,
"pass": pass,
};
let url = "https://test/test/";
let body = JSON.stringify(payload);
let response = await context.fetcher.fetch({
cacheTtlSecs: 0,
method: "POST",
url: url,
headers: {
"Content-Type": "application/json"
},
body: body,
});
let data = response.body;
And I see that data is coming to the server in different formats. "user=demo&pass=12312313" "{\"user\":\"demo\",\"pass\":\"12123\"}"
I think that at the output of the coda.io the request somehow changes…
Can you tell me how to get around this, or maybe I don’t understand something. Thank you in advance!
I’m more concerned about what the coda.io does with the data, it feels like the coda.io is adding something somewhere at the output, and authorization is not going on the server (which I also don’t control)…
Hi @pavel_tsvetov - Welcome to the Coda community! It looks like the data parameter of Python’s Requests library passes the values as form-encoded pairs:
Your dictionary of data will automatically be form-encoded when the request is made: