DEV Community

Gabriel Valin
Gabriel Valin

Posted on

3

HTTP - Verbs, HTTP codes & Request Params

Verbs

  • GET - Reading infos
  • POST - Create infos
  • PUT - Update Infos
  • PATCH - Update PARTIAL info (example: avatar from user)
  • DELETE - Delete infos

HTTP - Status Code

  • 1xx - Informative: processing..
  • 2xx - Confirmation:
    • 200: Request success
    • 201: Created - AFTER REQUEST POST
  • 3xx - Redirect:
    • 301: Moved Permanently
    • 302: Moved
  • 4xx - Client Error
    • 400: Bad Request
    • 401: Unauthorized
    • 403: Forbidden
    • 404: Not Found
    • 422: Unprocessable Entity
  • 5xx - Server Error
    • 500: Internal Server Error
    • 502: Bad Gateway

Request Params

  • Header Params: Token, authorization, cors
  • Query Params: key,value,separator (page=28&)
  • Route Params: /products/{id}
  • Body Params: { name: 'john doe', last_name: 'stewie' }

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay