HTTP POST 요청 구조 분석

폼 데이터

HTTP 요청 전체 구조

POST /product.do?cmd=insert-form HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Content-Length: 30
Connection: keep-alive
Cache-Control: max-age=0
Origin: <http://localhost:8080>
Referer: <http://localhost:8080/product.do?cmd=insert-form>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...

name=콜라&price=1000&qty=5

HTTP 헤더 (Request Headers)

필수 헤더

POST /product.do?cmd=insert-form HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Content-Length: 30

헤더 설명

추가 헤더 (브라우저가 자동으로 추가)

Connection: keep-alive
Cache-Control: max-age=0
Origin: <http://localhost:8080>
Referer: <http://localhost:8080/product.do?cmd=insert-form>
User-Agent: Mozilla/5.0 ...
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7
Accept-Encoding: gzip, deflate, br

HTTP 바디 (Request Body)