Form: HTTP method domain part of URL HTTP ver. Header fields blank line semantics Message body The HyperText Transfer Protocol: Methods GET - Fetch a document POST - Execute the document, using the data in body HEAD - Fetch just the header of the document PUT - Store a new document on the server DELETE - Remove a document from the server An example of the first line of a request: GET /degrees.html HTTP/1.1 Format of second line header (optional) name followed by a colon and the value of the field. HTTP Headers Four categories of header fields: General, request, response, & entity Common request fields: Accept: text/plain Accept: text/* If-Modified_since: date Common response fields: Content-length: 488 Content-type: text/html Can communicate with HTTP without a browser telnet blanca.uccs.edu http Creates connection to http port on server …….. http command eg: GET /respond.html HTTP/1.1 Host: blanca.uccs.edu Response phase Form: Status line Response header fields blank line Response body Status line format: HTTP version status code explanation Example: HTTP/1.1 200 OK
Form: HTTP method domain part of URL HTTP ver. Header fields blank line semantics Message body The HyperText Transfer Protocol: Methods GET - Fetch a document POST - Execute the document, using the data in body HEAD - Fetch just the header of the document PUT - Store a new document on the server DELETE - Remove a document from the server An example of the first line of a request: GET /degrees.html HTTP/1.1 Format of second line header (optional) name followed by a colon and the value of the field. HTTP Headers Four categories of header fields: General, request, response, & entity Common request fields: Accept: text/plain Accept: text/* If-Modified_since: date Common response fields: Content-length: 488 Content-type: text/html Can communicate with HTTP without a browser telnet blanca.uccs.edu http Creates connection to http port on …….. server http command eg: GET /respond.html HTTP/1.1 Host: blanca.uccs.edu Response phase Form: Status line Response header fields blank line Response body Status line format: HTTP version status code explanation Example: HTTP/1.1 200 OK
10cs73.docx