Ŭ¶óÀ̾ðÆ®´Â »ç¿ëÀÚÀÇ ¿äû¿¡ µû¶ó ´ÙÀ½°ú °°Àº ÇüÅÂÀÇ request ¸Þ½ÃÁö¸¦ ±¸¼ºÇØ ¼¹ö¿¡ Àü¼ÛÇÑ´Ù.
Simple-request = GET SP Request-URI CRLF(HTTP/0.9)
Full-Request = Request-Line (HTTP/1.0)
General-Header
Request-Header
Entity-Header
CRLF
Entity-Body
Request-Line
Request-LineÀº Full-Request ¸Þ½ÃÁöÀÇ Ã¹ ºÎºÐÀ¸·Î ¹Ýµå½Ã Á¸ÀçÇØ¾ß Çϸç Çü½ÄÀº ´ÙÀ½°ú °°´Ù.
Request-Line = Method SP Request-URI SP HTTP-Version CRLF
¿¹) GET http://qaos.com/index.htm HTTP/1.0
Method
ÀÚ¿øÀ» ¿äû ¹æ¹ýÀ» ÁöÁ¤ÇÏ´Â Ç׸ñÀ¸·Î GET, HEAD, POST Áß ÇϳªÀÇ °ªÀ» °®´Â´Ù.
- GET
- ÀÚ¿øÀÇ ¿äû½Ã °¡Àå ÀϹÝÀûÀ¸·Î »ç¿ëµÇ´Â ¹æ¹ýÀ¸·Î If-Modified-Since header field¸¦ ÀÌ¿ëÇÒ °æ¿ì Á¶°ÇºÎ GETÀÌ °¡´ÉÇÏ´Ù. Á¶°ÇºÎ GET´Â ÁÖ·Î cacheµÇ¾îÀÖ´Â entity¸¦ °»½ÅÇϴµ¥ »ç¿ëµÈ´Ù.
- HEAD
- GET°ú µ¿ÀÏÇÏÁö¸¸ Entity-Body ºÎºÐÀ» ¼¹ö°¡ º¸³»ÁÖÁö ¾Ê´Â´Ù. µû¶ó¼ ƯÁ¤ ÇÏÀÌÆÛ ¸µÅ©ÀÇ Á¸Àç¿©ºÎ¸¦ °Ë»çÇϴµ¥ »ç¿ëµÈ´Ù.
- POST
- GET°úÀÇ °¡Àå Å« Â÷ÀÌÁ¡Àº Request ¸Þ½ÃÁö¿¡ ¼¹ö¿¡ Àü´ÞµÉ entity¸¦ Æ÷ÇÔÇÒ ¼öÀÖ´Ù´Â °ÍÀÌ´Ù. µû¶ó¼ ¼¹ö¿Í ´Ù·®ÀÇ µ¥ÀÌÅ͸¦ ÁÖ°í ¹Þ´Âµ¥ ÀûÇÕÇϹǷΠ¹æ¸í·Ï°ú °°Àº FormÀ» ó¸®Çϴµ¥ ¸¹ÀÌ »ç¿ëµÈ´Ù. ´Ü POST¸¦ »ç¿ëÇÏ´Â °æ¿ì Request ¸Þ½ÃÁö¿¡ µ¥ÀÌÅÍÀÇ Å©±â(Entity-BodyÀÇ Å©±â)¸¦ ÇÔ²² Àü¼ÛÇØ¾ß ÇÑ´Ù.
Request-URI
¿äûÇÑ ÀÚ¿øÀÇ À§Ä¡¸¦ ³ªÅ¸³»´Â Ç׸ñÀ¸·Î ÀϹÝÀûÀ¸·Î Àý´ë °æ·Î¸¦ »ç¿ëÇϸç, ÇÁ·Ï½Ã ¼¹ö¸¦ °æ¿ìÇÏ´Â °æ¿ì¿¡¸¸ Àý´ë URI¸¦ »ç¿ëÇÑ´Ù.
Àý´ë URI
Proxy ¼¹ö°¡ ÀÖ´Â °æ¿ì Àü´ÞµÇ´Â Çü½Ä
GET http://qaos.com/index.htm HTTP/1.0
Àý´ë path
ÇÁ·Ï½Ã ¼¹ö°¡ ¾ø´Â °æ¿ì Àý´ë °æ·Î¸¸ Reuest-URI·Î º¯È¯µÇ¾î ¼¹ö¿¡ Àü´ÞµÈ´Ù.
GET /index.htm HTTP/1.0
HTTP Version
ÇöÀç Åë½Å¿¡ »ç¿ëÁßÀÎ HTTPÀÇ ¹öÀüÀ» Ç¥½ÃÇÑ´Ù. ÇÁ·ÎÅäÄÝ/x.xÀÇ Çü½ÄÀ» »ç¿ëÇÑ´Ù.
Request-Header
Accept Request Header
request ÀÀ´äÀÇ ÇüÅÂ(Àü´ÞµÇ´Â entityÀÇ ¹Ìµð¾î ŸÀÔ)¸¦ ÁöÁ¤ÇÑ´Ù.
Accept: audio/basic; q=0.1; mxb=100000
Authorization Request Header
»ç¿ëÀÚ ÀÎÁõÀ» ÇÊ¿ä·Î ÇÏ´Â °æ¿ì, »ç¿ëÀÚ¸í°ú ¾ÏÈ£¸¦ Àü´ÞÇÑ´Ù.
Authorization: anVuaG9sZWU6bGVla2luZw==
From Request Header
¹®¼¸¦ ¿äûÇÑ »ç¿ëÀÚÀÇ e-mail ÁÖ¼Ò¸¦ Àü´ÞÇÑ´Ù.
From: [email protected]
If-Modified-Since Request Header
¿äûÇÑ URI ÀÚ¿øÀÌ º¯°æµÈ °æ¿ì¸¸ ±× ÀÚ¿øÀ» Àü¼ÛÇØ ÁÖµµ·Ï ¿äûÇÑ´Ù.
GET /nas.html HTTP/1.0
If-Modified-Since: Web,10 Jul 1996 19:00:00
Referer Request Header
¸µÅ©¸¦ Á¦°øÇÑ ¹®¼ÀÇ URI¸¦ Àü¼ÛÇÑ´Ù.
Refer: http://qaos.com/mail.htm
User-Agent Request Header
Ŭ¶óÀ̾ðÆ® ¼ÒÇÁÆ®¿þ¾î¿¡ ´ëÇÑ Á¤º¸¸¦ Àü¼ÛÇÑ´Ù.
User-Agent: CERN-LineMode/2.15 libwww/2.17b3