Custom headers with pycurl

前端 未结 3 1913
南方客
南方客 2021-02-07 01:38

Can I send a custom header like \"yaddayadda\" to the server with the pycurl request?

3条回答
  •  粉色の甜心
    2021-02-07 01:55

    you can, with HTTPHEADER. just provide your custom headers as a list, like so:

    header = ['test: yadayadayada', 'blahblahblah']

    curl.setopt(pycurl.HTTPHEADER, header)

提交回复
热议问题