Send form data from Tornado HTTPClient

How can I use the fetch method to send multipart form data in a POST request? I don't see this mentioned in the documentation anywhere.

I tried this, but the arguments on the server (HTTPServerRequest.arguments) were empty:

    headers={'Content-Type': 'form-data'},
    body=urllib.parse.urlencode({'a': 1, 'b': 2})

Read more here:

Content Attribution

This content was originally published by shadowtalker at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: