How do I send Basic Auth Credentials with Curl? [Python Code]

To send basic auth credentials with Curl, use the "-u login:password" command-line option. Curl automatically converts the login:password pair into a Base64-encoded string and adds the "Authorization: Basic bG9naW46cGFzc3dvcmQ =" header to the request. Below is an example of sending a Curl request with basic auth credentials. The Python code was automatically generated for the Curl Basic Auth example.
Loading...