REST HTTP Basics

13
Developing RESTful APIs using JAX-RS HTTP MESSAGES

Transcript of REST HTTP Basics

Page 1: REST HTTP Basics

Developing RESTful APIs using JAX-RS

HTTP MESSAGES

Page 2: REST HTTP Basics

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: [email protected]

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

About Suresh Madhra

Page 3: REST HTTP Basics

HTTP Communication

Page 4: REST HTTP Basics

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.)

Page 5: REST HTTP Basics

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.

Page 6: REST HTTP Basics

HTTP Request and Response Message

Page 7: REST HTTP Basics

HTTP Request/ Response Message Format

Request

Page 8: REST HTTP Basics

HTTP Request Line

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

Path to resource Query string

HTTP /1.1

Page 9: REST HTTP Basics

HTTP Methods

Page 10: REST HTTP Basics

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

Page 11: REST HTTP Basics

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

Page 12: REST HTTP Basics

HTTP Entity Header

Request/ Response Entity Header

Carry information about the content

Mainly part of HTTP Response

Entity Headers

Page 13: REST HTTP Basics

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