Register to get access to free programming courses with interactive exercises

HTTP requests in the browser HTTP API

The easiest way to see how HTTP APIs are used 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. This also includes information about all HTTP requests.

This 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 it won't be hard to repeat the same thing in other 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. This includes images, fonts, style files, JavaScript and the HTML of the page itself.

The Network tab while downloading Code Basics

Each of the downloadable resources can be clicked on. Several more tabs will appear with information about what HTTP request was sent and what HTTP response was received. 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, on the Network tab, press the Fetch/XHR button, then only xhr resources will stay in the list of downloadable resources. These are just requests to the HTTP API.

Let's 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.

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.


Hexlet Experts

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

From a novice to a developer. Get a job or your money back!

Frontend Developer icon
Profession
beginner
Development of front-end components for web applications
start anytime 10 months

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.