Register to get access to free programming courses with interactive exercises

HTTP requests in browsers HTTP API

The easiest way to see how HTTP APIs works is directly in the browser. For ease of development and testing, browsers include a developer panel that allows for a complete analysis of the page and the processes taking place within. It also has information about all HTTP requests.

The article will help you open the developer panel in your browser. In this course, we'll use the Chrome browser bar. The other browsers work almost identically, so you can repeat the same thing in different browsers.

Chrome Developer Panel

Chrome DevTools

Here we're interested in the Network tab. It displays all the requests that the browser performs during page loading. It includes images, fonts, style files, JavaScript, and the HTML of the page itself.

The Network tab while downloading Code Basics

Users can click on each downloadable resource. Several more tabs will appear with information about the sent HTTP request and the received HTTP response. Here you can see all the headers and previews of the downloaded resource.

Loading HTML for Code Basics

You can also find requests to the HTTP API in the same tab. These requests are executed during the interaction with the page using the API. To separate HTTP API requests from everything else, press the Fetch/XHR button on the Network tab. Then, only xhr resources will stay in the list of downloadable resources. These are just requests to the HTTP API.

Let us take the topics on Hexlet as an example. When a user asks or answers a question, the site performs a request to the API. Check it out for yourself:

  1. Open the Developer Panel and click the Network tab. Click Fetch/XHR
  2. Open the Discussions tab
  3. Create a topic. A prompt should appear in the Developer Panel
  4. Delete this topic. Another request will appear in the Developer Panel

API response when creating a topic

Study these requests, look at the URL, HTTP headers, HTTP method, response code, and the data sent (request body). You can study any site in the same way.


Are there any more questions? Ask them in the Discussion section.

The Hexlet support team or other students will answer you.

About Hexlet learning process

For full access to the course you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
130
courses
1000
exercises
2000+
hours of theory
3200
tests

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.bookmate">Bookmate</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.healthsamurai">Healthsamurai</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.dualboot">Dualboot</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.abbyy">Abbyy</span>
Suggested learning programs
profession
Development of front-end components for web applications
10 months
from scratch
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.