HTTP for programming :HTTP Client



 


HTTP Version

  • HTTP/0.9
  • HTTP/1.0
  • HTTP/1.1
  • HTTP/2.0
  • HTTP/3.0

Type of HTTP Request/Response

  • Client request
  • Server response

HTTP/1.1 request /response messages

  • Request Syntax
  • request line 
  • Request methods OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PATCH
  • Safe methods
  • Idempotent methods
  • Cacheable methods
  • Request header fields
  • Response Syntax
  • Response status codes
  • Response header fields

HTTP message headers are represented 

    Key: Value,


example HTTP message header:
  "content-length": "123",
  "content-type": "text/plain",
  "connection": "keep-alive",
  "host": "simple.com",
  "accept": "*/*" 

Node HTTP standard module

  1. built-in Fetch API
  2. Axios
  3. Got
  4. superagent
  5. node-fetch
  6. Fetch API

ความคิดเห็น