Get started · Lesson 1 of 20
Send your first request
Open the app, send a request, read what came back and keep the request for later.

An API request is a message to a server: a method (what you want to do, such as GET to read or POST to create), a URL (where), and optionally headers and a body. The server answers with a status code, its own headers and a body. In this lesson you send one and learn to read the answer.
Open the app
Create a free account with GitHub or an email address, then go to swastik.codes/app. Your requests are saved in the cloud and available on every device. Want something to stay on this computer only? Use the Scratch Pad, a local workspace whose data never leaves your browser. Prefer a desktop app? Download it for Windows or Linux; everything in these lessons works the same there.
Send a request
- Click New at the top, then HTTP request (or press
Ctrl+T). - Leave the method as GET and type this URL:
https://httpbin.org/get?hello=world - Press Send (or
Ctrl+Enter).
The response appears below the request (or beside it on a wide screen).
Read the response
- Status:
200 OKmeans it worked.4xxcodes mean the request was wrong (for example401not signed in,404not found);5xxcodes mean the server failed. - Time and size: how long the answer took and how big it was. Hover over the time to see where it went: DNS, connecting, TLS, waiting for the first byte and downloading.
- Body: the data. JSON is formatted and coloured; switch to Raw to see it exactly as it arrived, or use the tree view to fold big objects.
- Headers and Cookies: what the server sent besides the body.
Notice that hello=world from the URL also appears in the Params tab of the request. Editing either one updates the other.
Send data with POST
- Change the method to POST and the URL to
https://httpbin.org/post. - Open the Body tab, choose raw and JSON, and type:
{ "name": "Ada", "role": "admin" }- Press Send. httpbin echoes your JSON back under
json, which proves the server received it.
Swastik Codes adds the Content-Type: application/json header for you. You can see it, and add your own, in the Headers tab.
Save the request
Press Ctrl+S. The first time, Swastik Codes asks where to save: create a collection (call it My first API) and give the request a name such as Create user. Collections are folders for requests; the next lessons use them for variables, tests and runs.
What you learned
- A request is a method, a URL, headers and a body; a response is a status, headers and a body.
Ctrl+Entersends,Ctrl+Ssaves, and History keeps everything you sent.
Next: stop typing the same server address in every request by using variables.