REST HTTP Basics

Post on 24-Jan-2017

10 views 3 download

Transcript of REST HTTP Basics

Developing RESTful APIs using JAX-RS

HTTP MESSAGES

16 years of Industry Experience

Worked in Hughes, HCL India PVT LTD, IBM India PVT LTD, CSC India ( > 4 years)

Proficiency

Project managed full life cycle application & product development and run/

maintenance projects

Agile Coach, Certified PMP®, and Certified ITIL® Foundation Associate

Passion

Imparting Knowledge through Trainings, webinars, conference & Articles

Contact Details

Email: sureshkumarmadhra@yahoo.com

LinkedIn: https://www.linkedin.com/in/sureshmadhra

About Suresh Madhra

HTTP Communication

HTTP Request Message

HTTP request message is sent from the client (Brower) to HTTP Web-Server.

Request message contain:

location of a resource or resource URI

HTTP method to use when accessing the resource.

Optional request headers (name-value pairs) providing additional

information

Request body that identifies additional data to be uploaded to the

server (e.g. form parameters, attachments, etc.)

HTTP Response Message

HTTP response message is sent from HTTP Web-Server back to the client

(Web-Browser).

Response message contain:

Carry status of processed request.

Provide response headers (name-value pairs) providing additional

information about the response

Supplies optional response body that identifies additional data to be

downloaded to the server (e.g. html, images, attachments etc.

HTTP Request and Response Message

HTTP Request/ Response Message Format

Request

HTTP Request Line

/fruits/list?category=fruits&limits=20

Path to resource Query string

HTTP /1.1

HTTP Methods

HTTP General Header

Request/ Response General Header

Carry information about the HTTP transaction

Can be a part of request, as well as response

General Headers

HTTP Request Header

Request Header

Specific to an HTTP Request

Carry information about the client, and the type of request

Facilitates better understanding between client and server

Request Headers

HTTP Entity Header

Request/ Response Entity Header

Carry information about the content

Mainly part of HTTP Response

Entity Headers

HTTP Response Status code

Response Status Code

Indicate the server’s processed status corresponding to a request

Combination of a numerical code, and a short description