GET vs POST — What's the Difference in HTTP?

GET requests data and should have no side effects; POST submits data and can change server state. Learn the practical differences and when to use each.

Published September 20, 2026

GET requests are meant to retrieve data and should be safe (no side effects) and idempotent (repeating the same request produces the same result). POST requests submit data to the server and are typically used to create or change something, with no guarantee that repeating the request is safe.

Common causes

  • The HTTP specification designed GET and POST for different semantic purposes: GET for retrieval, POST for submission/mutation — browsers, caches, and proxies rely on this distinction

How to fix it

  • Use GET for any request that just reads data — search queries, fetching a resource, listing records — so it can be safely cached, bookmarked, and retried
  • Use POST for actions that change state — creating a record, submitting a form, triggering a payment — since retrying a POST can duplicate the action if not handled carefully
  • Never put sensitive data (passwords, tokens) in a GET request's query string — it ends up in browser history, server logs, and can be cached

Example

GET /api/users?search=ada HTTP/1.1

POST /api/users HTTP/1.1
Content-Type: application/json

{"name": "Ada Lovelace"}

FAQ

Is there a size limit difference between GET and POST?

GET requests are limited by URL length restrictions (browsers/servers typically cap this around 2000-8000 characters), while POST bodies can carry much larger payloads since the data isn't in the URL.

More HTTP articles