Curl POST With Basic Authentication [Python Code]

An example of making a POST request with Basic Authentication credentials using Curl. Basic Authentication credentials are passed to Curl with the --user "login: password" command-line option. The user's credentials are automatically converted by Curl to a Base64 encoded string and passed to the server with an Authorization: Basic [token] header. POST data is passed to Curl with the -d option. In this Curl POST with Basic Authentication header example, we sent a request to the ReqBin echo URL. Click Run to execute the Curl POST request online and see the result. The Python code was automatically generated for the Curl POST Basic Authentication example.
Loading...