Skip to content
CodeKruPro

Rebuild a browser request using Network and cURL

8/32

01 · Read and understand requests

Recommended first: Use status codes as evidence, not the whole verdict

Your goal: Rebuild a browser request using Network and cURL

Follow one request at a time. Send it yourself, then select that response before you answer.

  1. 1Send requests
  2. 2Submit answers

Start here: sign in to practise.

Jump to practice

What you will learn

The browser Network panel shows requests behind a screen. Copy as cURL describes the method, address and headers in text. Reading a command does not require writing code.

Your goals

  • Locate a request in browser DevTools.
  • Translate a cURL request into console fields.

Before you start

Read the previous lesson first if you have not already. This course does not require programming.

Practice setup

These requests use the public TestKru teaching API. No workspace is needed unless a step says so. Leave the body empty for GET, HEAD and OPTIONS. Example people and emails are fictional. Changes to /api/users are simulated and are not saved.

Supplied training evidence / contract

Fallback captured request: curl "https://testkru.com/api/search?category=books&limit=2" -H "Accept: application/json". A quoted URL keeps & inside the address. -H supplies a header. No -X is needed here: cURL defaults to GET.

Follow these steps

  1. Open the API documentation in a browser, open Developer Tools, select Network and clear the list. Trigger a documented users/search request if the page provides a Try action.
  2. Select that network row. Inspect Request URL, method, query, request headers, response status and body. If no Try action is available, use the fallback captured request above.
  3. Use Copy as cURL on the row, or read the supplied command. Explain each flag you retain. Never paste a copied real-account token into course evidence.
  4. Rebuild the supplied fallback as GET https://testkru.com/api/search?category=books&limit=2 with Headers {"Accept":"application/json"} and no body. Send it from the console.
  5. Compare the outgoing URL/query/header and resulting data. Record the request and a short mapping of cURL parts to console fields.

Investigate before concluding

First record the actual result for each case. Compare the body, headers and later state with the stated contract. Keep an observation separate from a prediction; use the model answer only after making your own attempt.

What to keep as evidence

  • Method, query and meaningful header are reconstructed.
  • Command syntax is explained in plain language.
  • Copied secrets are removed before sharing.
References for this lesson

Finish this assignment

Select each named response with Use this response. Answer from those responses or the transcript on this page. Click Submit Answers. Your score is the percentage of checks that passed. Core checks are required to finish. Extra evidence checks are labelled. A saved 100/100 means every check passed. Continue opens the next lesson you can submit.

If something goes wrong
  • Change one part of the request at a time. If a check needs attention, read the note under it and compare it with the response you selected.
Self-review and independent variation
  • Method, query and meaningful header are reconstructed.
  • Command syntax is explained in plain language.
  • Copied secrets are removed before sharing.

Add sort=desc manually and explain the change in returned order.

Automatic checks verify the requests and answers configured for this lesson. The self-review is for your own reasoning. A score is not a certificate.

Open API reference

Practise and save your evidence

The lesson is public. Sign in to send requests and save progress. You will return to this lesson.

Sign in to practiseCreate an account