I am trying to replicate the following POST request using the requests module in python:
POST /example/asdfas HTTP/1.1 Host: example.com User-Agent: Mozilla/
import requests from requests_toolbelt import MultipartEncoder url = 'http://example.com/example/asdfas' fields = {'value_1':'12345', 'value_2': '67890'} data = MultipartEncoder(fields=fields) headers["Content-type"] = m.content_type requests.post(url=url, data=data, headers=headers)