Showing posts with label HTTP. Show all posts
Showing posts with label HTTP. Show all posts

Tuesday, December 14, 2021

MIME content type

 MIME stands for Multipurpose Internet mail-extension.

MIME describes the response format sends by server to the client.

Syntax:

type/sub-type

Ex:text/html,application/json etc.

HTTP response code

Server sends http response code with http response header.
Every response code has individual meaning .
let see some of the status code-

100-199 ----Informational
200-299-----Successful
300-399-----Redirection
400-499-----Client error (ex-404 file not found)
500-599-----Internal server error(ex-500 internal server error)

Http reqeust and response structure

 A http request has 3 parts-

1.Request line-The http command(Ex-get,post,put,delete)

2.Header variable-Request meta data(Ex-connection ,keep alive etc)

3.Message body-Content of the message(payload)


A http response has also 3 different areas-

1.Response line-Server protocol and status code

2.Header variable-response metadata(ex:content type-json,xml,size and length of the data etc)

3.Message body(list of customer as json/xml) 

Javascript module

JavaScript Modules (ES6) let you split code into multiple files and reuse code cleanly. Main keywords: export → make something available...