# HTTP & REST APIs for App Developers

> Requests, methods, status codes, headers, JSON and REST conventions, seen from the client side of a mobile app. Free notes, key concepts, resources and a mini...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/http
Last updated: 2026-11-28

Requests, methods, status codes, headers, JSON and REST conventions, seen from the client side of a mobile app.

Beginner · about 5 hours · difficulty 2/5

Learn first: [Async Code & the Main Thread](https://www.internhack.in/roadmaps/tracks/mobile/async-programming)

Nearly every app talks to a backend over HTTP. You do not need to build servers, but you must read API docs fluently and debug failed requests.

### The essentials

- A request has a **method** (`GET` read, `POST` create, `PUT`/`PATCH` update, `DELETE` remove), a **URL**, **headers** and an optional **body**.
- Responses carry a **status code**: `2xx` success, `3xx` redirect, `4xx` client error (`401` not authenticated, `403` forbidden, `404` not found, `422` validation), `5xx` server error.
- **JSON** is the usual body format; set `Content-Type: application/json`.
- **Authorization** headers carry tokens: `Authorization: Bearer <token>`.

### REST conventions

Resources as nouns (`/users/42/orders`), query parameters for filtering and pagination (`?page=2&limit=20` or cursor-based `?after=abc`).

### Mobile specifics

- **HTTPS only**: iOS App Transport Security and Android's network security config block cleartext by default.
- Networks are slow and flaky: always set timeouts, handle "no connection", and retry idempotent requests with backoff.
- Test APIs with a tool like Bruno, Insomnia or curl before wiring them into the app.

**Good enough to move on:** you can read an API reference, reproduce a call with curl, and explain what a 401 vs 403 vs 500 means for your UI.

## Key concepts

- **HTTP methods**
- **Status codes**
- **Headers and JSON bodies**
- **REST resource design**
- **Pagination styles**
- **HTTPS and cleartext restrictions**
- **API testing tools**

## Mini project

Pick a public API (for example a weather or movies API), document three endpoints you need, and reproduce each with curl including one error case.

## Check yourself

Your app gets a 401 on a request that worked yesterday. What does that suggest, and what should the app do?

## Free resources

- [MDN: HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) (MDN)
- [MDN: HTTP response status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) (MDN)

Previous: [Swift Concurrency & Persistence (SwiftData, Core Data)](https://www.internhack.in/roadmaps/tracks/mobile/ios-concurrency-data) · Next: [Networking Clients & Server-state Caching](https://www.internhack.in/roadmaps/tracks/mobile/networking-clients)

## More in Data: Networking, Storage & Offline-first

- [HTTP & REST APIs for App Developers](https://www.internhack.in/roadmaps/tracks/mobile/http)
- [Networking Clients & Server-state Caching](https://www.internhack.in/roadmaps/tracks/mobile/networking-clients)
- [GraphQL Clients](https://www.internhack.in/roadmaps/tracks/mobile/graphql)
- [Local Storage: Key-value, SQLite & Files](https://www.internhack.in/roadmaps/tracks/mobile/local-storage)
- [Offline-first & Data Synchronisation](https://www.internhack.in/roadmaps/tracks/mobile/offline-first)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
