Http & Restful HTTP API

Hyerang Kim·2020년 5월 17일
0

What is HTTP?

Header information includes

  1. 해당 request에 대한 additional information을 담고 있는 부분
    • ex) content-length in by of request message
  2. Headers divide into 3 parts (general headers, request headers, entity headers)
  3. Frequently used headers
  • Host
    요청이 전송되는 target의 host url: 예를 들어, google.com
  • User Agent
    클라이언트의 정보(웹브라우저에 대한 정보)
  • Accept
    해당 요청이 받을 수 있는 response type
  • connection
    해당 요청이 끝난 후에 클라이언트와 서버가 계속해서 네트워크 커넥션을 유지할 것인지 아니면 끊을 것인지에 대해 지시하는 부분
  • content-type
    해당요청이 보내는 메세지 타입

Body

  • 해당 request의 실제 메세지/내용

  • body가 없는 request도 많음
    ex) GET request

    HTTP response의 구조

  • status line

  • headers

  • body

어떤 요청일까? 결제요청
Accept-Encoding: 제안된 두가지중에 압축해서보내라

Headers

  • response의 header과 동일
  • response에만 쓰는 header가 있음

PUT은 잘 안씀/ POST한테 밀려서

profile
Backend Developer

0개의 댓글