Request from

I send a request from Python:

requests.request("POST", "https://test/test/", data={'user': 'demo', 'pass': '12312313'})

and from

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.

I think that at the output of the the request somehow changes…
Can you tell me how to get around this, or maybe I don’t understand something. Thank you in advance!

The first suggests the values are passed in the URL. The second suggest the data is passed in the body.

I’m no Python expert, but I think you want something like this where myobj is the json data object.

x =, json = myobj)

Thanks for the answer)

I’m more concerned about what the does with the data, it feels like the is adding something somewhere at the output, and authorization is not going on the server (which I also don’t control)…

Don’t you mean - you’re more concerned with what //test/test does with the data passed from Coda?

Which format is working? The Python or the JavaScript examples?

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:

You can do the same thing in the Pack SDK Fetch using the form field of the request:

let response = await context.fetcher.fetch({
  method: "POST",
  url: "",
  form: {
    name: "Alice",
    active: String(true),
    days: String(15),

Python is running.
Below is an explanation of what I did wrong in js

Thanks a lot! have a nice day!
I realized that I was doing it wrong!

Didn’t display?