Basic Authentication with Fiddler Everywhere
|Product Version||1.0.1 and above|
Fiddler Everywhere certificate allows the inspection and debugging of network traffic. The Composer feature in Fiddler Everywhere enables you to manually build and send HTTP or HTTPS requests. Click here to know more about Fiddler Everywhere Composer.
In the context of an HTTP transaction, Basic Access Authentication is a method for an HTTP user agent (for example, a web browser) to provide a user name and password when making a request. In Basic HTTP Authentication, a request contains a header field in the form of
Authorization: Basic <base64 string>, where credentials are the Base64 encoding of
password joined by a single colon(
Now, let's see how you can create a Composer request for APIs that require Authentication:
In the steps shown below, you can use httpbin.org for HTTP request and response service.
Set the HTTP/HTTPS method to GET and add the URL in the URL field. The added URL has been generated from the httpbin.org.
In the above image, the specified URL is https://httpbin.org/basic-auth/user1/pass1. Here basic-auth determines that the Authentication taking place is Basic. The next two fields user1 and pass1 are the values of
passwd variables, respectively.
Create an object inside the Body tab. The predefined variables for the Basic Authentication are
passwd. Set the values for both variables.
In the above image, the values of the
passwd variables are user1 and pass1, respectively.
Once you create the object in the Body, go to the Headers tab, where you can see a predefined key
User-Agent added from Fiddler Everywhere. Now, let's add the Authorization key to the header. For that:
Encode the values of the variables set in the JSON format. Encode the texts with simple Base64 converters. The format of the text should be
<username>:<password>. The encoded value of user1:pass1 is
In Headers tab:
- Set the Key to
- Set the Value to
- Add a Description for the key. Click the tick.
- Set the Key to
A key named
Authorization has been added to the Headers tab.
After executing all the above steps, click Execute (placed at the right side of the URL field).
Clicking the Execute button will add two more Keys to the Headers tab named
Following the above steps will create Basic Authentication with Fiddler Everywhere. To check, go through the Response Inspector section of the Composer. A successful request should return status 200 from the server along with the server-specific payload.
Refer to the image below:
The above response is HTTPBin specific as we used it to create the Basic Authentication.