Learn everything you need to know about Fiddler’s composer tab and how to use it. Part 1 of a series.
Fiddler is well known for its ability to capture HTTP(S) traffic, which makes it possible to debug any website or application. However, there is another feature that may be just as useful, and that’s creating HTTP(S) requests. This gives you the ability to communicate with the web server with precision, thus calling only the resources you want. Something that is hardly achievable in a real-life application.
You can access everything you need to create new request from the Composer tab in Fiddler.
It supports two different modes, but you’ll probably need the Parsed one. There you can specify the HTTP method, the URL, the HTTP version, the Headers and the Body of the request. On the right you can find the History panel where you can easily load a previously executed request.
Sending GET Request
This is the most used request type. Every time you type an URL inside your browser, you’re sending a get request to the server. To create a GET request inside Fiddler, choose the GET method and type the server URL in the URL box. Then click the Execute button.
NOTE: Once the request is sent to the server, use the Inspectors to inspect the response. There is a different inspector type for almost all response content types like JSON, Web, etc. This way you can verify if the response you’re getting is as expected.
Sending POST Request
Unlike the GET request, where you should specify only the URL, in POST requests, there is an additional optional parameter - Request Body. These requests are used when you want to send data back to the server. The most common usage is when you submit a form in a website. To send a new POST request, choose POST for method type, type the URL, enter the body content and click Execute.
Fiddler can create any type of request that is supported by the HTTP standard in a similar manner. Just choose the HTTP method and type the parameters of the request.
Working with Headers
HTTP headers are the way the way client gives additional context to the server. Any header consists of a case-sensitive name followed by a “:” then by its value (without line break). You can add a header to your request by appending inside the Header box – every header on new line. A list with all HTTP headers can be found here.
This is all you need to know about Telerik Fiddler’s composer and how it works. It gives you everything you need to create all kind of HTTP request you need. In the next blog post in this series, we will cover different user scenarios where the Composer can be very useful.
If you have any questions or comments, don’t hesitate to drop a line or two below. Any feedback is highly appreciated.