Skip to main content

All Questions

Tagged with
0 votes
0 answers
36 views

How to configure Python ssl server ciphers to match client's

I'm trying to run this simple socket ssl server in python import socket, ssl context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) bindsocket = socket.socket() bindsocket.bind(("", ...
GopherM's user avatar
  • 710
0 votes
1 answer
207 views

HTTPS GET with API Bearer Token: working with cURL but not with Python requests.get

When I launch the following cURL command on a https URL with an API token, I get the expected response (a list of files in my storage): curl -H "Authorization: Bearer <TOKEN>" "...
Jean-Francois T.'s user avatar
0 votes
0 answers
56 views

Equivalent of `curl --connect-to` in Python Requests library with HTTPS working

Follow up question to Equivalent of `curl --connect-to` in Python Requests library curl has an option connect-to --connect-to <HOST1:PORT1:HOST2:PORT2> For a request to the ...
Jannick Johnsen's user avatar
8 votes
1 answer
4k views

Why is Python's requests 10x faster than C's libcurl?

Python's requests library seems to be ~10x faster than C's libcurl (the C API, the CLI application, and the Python API) for a 1.6 MB request (requests takes 800ms, while curl/libcurl sometimes takes ...
étale-cohomology's user avatar
0 votes
1 answer
268 views

Post a chart in python StockTwits API

I am creating a python script, and I can't get this script to work properly. I have an image that is stored on my PC, and I need to send that image to StockTwits API. myobj = {'access_token': ...
Chris's user avatar
  • 431
0 votes
1 answer
923 views

How to use the authentication API to trigger password reset flow, python or curl

I'm trying to trigger a password reset flow with auth0 via the authentication api. I keep getting this error: {"error":"email or username are required."} When following the instructions here: https:/...
Ludo's user avatar
  • 2,527
0 votes
1 answer
385 views

How to translate curl command to urlfetch or request in general?

I'd like to issue an https request to an api from my gae-server, e.g. using urlfetch. Example call is given as curl command. curl <URL> \ -u <USER_KEY>: \ -d "infoa=123" \ -d "...
SLLegendre's user avatar
2 votes
1 answer
1k views

How to send data on a curl redirect?

I have an API which is currently on HTTP, I moved the API using SSLify library in python flask. Now when I send data using curl request curl -v -k -H "Content-Type: application/json" -X POST \ --...
prash Raghav's user avatar
0 votes
1 answer
119 views

How to read data passed by --data in Curl in python?

I am trying to read data passed using curl -d option in python. The data is in JSON and I tried using --data '{"title":"foobar","body": "This body has both "double" and 'single' quotes"}' request....
prash Raghav's user avatar
8 votes
3 answers
2k views

curl works fine, except if I call it with subprocess

I have a curl that looks a bit like this: curl -1 -X POST --user "xxx:yyy" -d "status=new&content=issue+details+at%3A+http%3A%2F%2Flocalhost%3A6543%2Ftest%2Fsubmit%2F16-07-03-H-20-18-&kind=...
Sheena's user avatar
  • 16.3k
1 vote
2 answers
3k views

python requests POST basic authentication returning 200 with empty body

import requests s = requests.Session() r = requests.Request('POST', 'https://'+url+'?name=value') prep = r.prepare() prep.headers = {'User-Agent': 'curl/7.38.0', 'Accept': '*/*', 'Authorization': '...
user1561108's user avatar
  • 2,747
2 votes
2 answers
4k views

Unable to use SSL on CherryPy 3.8.0

I am trying to use SSL on CherryPy 3.8.0. My basic example implements a ping response on SSL. I set the configuration for SSL in this way: # start Web Service with some configuration global_conf = { ...
gc5's user avatar
  • 9,916
1 vote
0 answers
75 views

Handshake when HTTP(S) POST delivers data to the server

I am POSTing to a certain httpsendpoint using a python script and pycurl (BASIC authentication, connection kept open over calls) and experience a strange behaviour: When POSTing from a client with ...
flaschbier's user avatar
  • 4,185
0 votes
1 answer
311 views

How to launch cgi script on remote via python

I would like to know if there is a python alternative to following curl command: curl https://$ip/some_folder/some_script.cgi -k -u $user:"$pass" --interface $some_ip --connect-timeout 20 --max-time ...
sztyrymytyry's user avatar
1 vote
1 answer
4k views

Python Requests PUT not working, but cURL does

I'm looking to PUT data to the Pipeline Deals API in Python with Requests, and though I get a Response 200, the data does not actually successfully PUT. When I make the exact same request with cURL, ...
rickcnagy's user avatar
  • 1,834

15 30 50 per page