SlideShare une entreprise Scribd logo
1  sur  31
HTTP
The protocol that allows for sending
docs back and forth on the web.
client role   server role
client role    server role



 initiates       responds
 interaction
header

body
includes metadata and
         HTTP methods



header

body




         includes data you want to transfer
         (text, pics, HTML, XML)
The response specifies the content type of the body




                          in the Content Type field
                          (e.g. text/html or application/json)
HTTP REQUEST METHODS
GET   POST   PUT   DELETE
HTTP REQUEST METHODS
GET              POST           PUT            DELETE

queries the      changes        produces new   deletes
representation   the state of   or replaces    resources
of a resource    a resource     content of
                                existing
                                resources
                                (idempotent)
REST
Representational State Transfer:
using the principles of the World Wide Web to build applications
REST                  ful
web services try to leverage HTTP in its entirety
using specific architectural principles
2
common perspectives
on architectural design
1
    Designer starts with
    nothing (blank) and builds




2
    an architecture from
    familiar components.



    2
    Designer starts with the
    system needs and
    applies constraints to
    elements of the system.
REST
       2
       Designer starts with the
       system needs and
       applies constraints to
       elements of the system.
CONSTRAINTS
 1  2    3
  4   5   6
1          Client-server Architecture

A server component offering services, listens for requests upon
these services. A client component desires that a service be
performed, sends a request to the server via a connector.




      client                                  server


triggering process                     reactionary process
initiates interaction by       responds to the request
sending a request for a        by either performing the
service to be performed        service or rejecting it




   client role                     server role



This separation allows for the two components to
evolve independently, which increases scalability.
2          Stateless Communication

Each request from the client must contain all necessary
information to understand the request.

This constraint induces:

• Visibility – need to look at only one request to get the
  full nature of the request
• Reliability – eases the task of recovering from failures
• Scalability – not having to store data between requests
  allows the server to free resources
3          Cache

Cache constraints require that the data within a response
to a request be labeled as cacheable or non-cacheable. If
a response is cacheable, a client cache is given the right to
reuse the response data for later, equivalent requests.

Cache constraints eliminate some interactions and improve
efficiency and scalability. Cache can decrease reliability
because of stale data.
4            Uniform Interface

1. Identification of resources

    A resource is any information that can be named. An example of a resource is
    the current weather in Austin, TX. Resource identification requires the same
    authority who maintains the reference to a resource to also be responsible for
    preserving meaning of that resource.


2. Manipulation of resources through representations

    The resources must be manipulated via representations. A client has no
    access to a resource directly, it can only send and receive representations
    from the server. (An example of a representation is an html page with a PNG
    image of the current weather in Austin, TX.)
Data Element              Modern Web Examples
resource                  the intended conceptual target of a
                          hypertext reference
resource identifier       URL, URN
representation            HTML document, JPEG image
representation metadata   media type, last-modified time
resource metadata         source link, alternates, vary
control data              if-modified-since, cache-control
Connector   Modern Web Examples
client      libwww, libwww-perl
server      libwww, Apache, API, NSAPI
cache       browser cache, Akamai cache
            network
resolver    bind (DNS lookup library)
tunnel      SOCKS, SSL after HTTP
            CONNECT
3. Self-descriptive messages
   States that all messages must include metadata which describe
   the meaning of the message.


4. Hypermedia as the engine of application state

   The steps in a REST architecture must be invoked through hypermedia. More
   specifically, in order for an application’s process to move a step, it must
   invoke that next step from a reference inside the current representation.
1
                Render the data where it’s
                located and send a fixed-format
                image to the recipient




3
options for a
distributed
hypermedia
                2
                Encapsulate the data with a
                rendering engine and
                send both to the recipient




                3
architect       Send the raw data to the recipient along
                with metadata that describes the data
                type so that the recipient can choose their
                own rendering engine
5          Layered System

Layered system style allows an architecture to be composed
of hierarchical layers by constraining component behavior so
each component cannot ‘see’ beyond the immediate layer
with which they are interacting.

Layered system style helps reduce complexity and promote
independence. Layers can be used to protect new services
from legacy clients. They can also add overhead.
6          Code on Demand

REST allows client functionality to be extended by
downloading and executing code in the form of scripts.
TESTING
RESTful APIs (with forms)
Download Simple
REST Client
Simple REST Client is a plugin for Chrome. Once
installed, you should have a button in the toolbar.
What else do you need?
• The API POST URL
• A POST string
• Content Type header
THE END.

Contenu connexe

Tendances

Representational state transfer (rest) architectural style1.1
Representational state transfer (rest) architectural style1.1Representational state transfer (rest) architectural style1.1
Representational state transfer (rest) architectural style1.1Vinod Wilson
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - muleSindhu VL
 
Mule digital signature processor
Mule digital signature processorMule digital signature processor
Mule digital signature processorKrishna_in
 
Anypoint enterprise security overview
Anypoint enterprise security overviewAnypoint enterprise security overview
Anypoint enterprise security overviewdanishsm84
 
Exchange 2013 Architecture Poster
Exchange 2013 Architecture PosterExchange 2013 Architecture Poster
Exchange 2013 Architecture PosterRian Yulian
 
Representational State Transfer (REST)
Representational State Transfer (REST)Representational State Transfer (REST)
Representational State Transfer (REST)Abhay Ananda Shukla
 
Session And Cookies In Servlets - Java
Session And Cookies In Servlets - JavaSession And Cookies In Servlets - Java
Session And Cookies In Servlets - JavaJainamParikh3
 
IRJET - Confidential Image De-Duplication in Cloud Storage
IRJET - Confidential Image De-Duplication in Cloud StorageIRJET - Confidential Image De-Duplication in Cloud Storage
IRJET - Confidential Image De-Duplication in Cloud StorageIRJET Journal
 
Exchange 2010 Poster
Exchange 2010 PosterExchange 2010 Poster
Exchange 2010 PosterPaulo Freitas
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mulemdfkhan625
 
Pinterest like site using REST and Bottle
Pinterest like site using REST and Bottle Pinterest like site using REST and Bottle
Pinterest like site using REST and Bottle Gaurav Bhardwaj
 
Troubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise IntegratorTroubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise IntegratorWSO2
 

Tendances (16)

Representational state transfer (rest) architectural style1.1
Representational state transfer (rest) architectural style1.1Representational state transfer (rest) architectural style1.1
Representational state transfer (rest) architectural style1.1
 
Apache ActiveMQ
Apache ActiveMQ Apache ActiveMQ
Apache ActiveMQ
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - mule
 
Mule hdfs connector
Mule hdfs connectorMule hdfs connector
Mule hdfs connector
 
Mule digital signature processor
Mule digital signature processorMule digital signature processor
Mule digital signature processor
 
IPCOM000242565D
IPCOM000242565DIPCOM000242565D
IPCOM000242565D
 
Anypoint enterprise security overview
Anypoint enterprise security overviewAnypoint enterprise security overview
Anypoint enterprise security overview
 
Exchange 2013 Architecture Poster
Exchange 2013 Architecture PosterExchange 2013 Architecture Poster
Exchange 2013 Architecture Poster
 
Representational State Transfer (REST)
Representational State Transfer (REST)Representational State Transfer (REST)
Representational State Transfer (REST)
 
componenets of osb12c
componenets of osb12ccomponenets of osb12c
componenets of osb12c
 
Session And Cookies In Servlets - Java
Session And Cookies In Servlets - JavaSession And Cookies In Servlets - Java
Session And Cookies In Servlets - Java
 
IRJET - Confidential Image De-Duplication in Cloud Storage
IRJET - Confidential Image De-Duplication in Cloud StorageIRJET - Confidential Image De-Duplication in Cloud Storage
IRJET - Confidential Image De-Duplication in Cloud Storage
 
Exchange 2010 Poster
Exchange 2010 PosterExchange 2010 Poster
Exchange 2010 Poster
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Pinterest like site using REST and Bottle
Pinterest like site using REST and Bottle Pinterest like site using REST and Bottle
Pinterest like site using REST and Bottle
 
Troubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise IntegratorTroubleshooting and Best Practices with WSO2 Enterprise Integrator
Troubleshooting and Best Practices with WSO2 Enterprise Integrator
 

Similaire à About HTTP and REST

53 hui homework2
53 hui homework253 hui homework2
53 hui homework2huis89
 
ReST (Representational State Transfer) Explained
ReST (Representational State Transfer) ExplainedReST (Representational State Transfer) Explained
ReST (Representational State Transfer) ExplainedDhananjay Nene
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST AssuredTO THE NEW Pvt. Ltd.
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 
Efficient Spring Data REST Development
Efficient Spring Data REST DevelopmentEfficient Spring Data REST Development
Efficient Spring Data REST DevelopmentCatalin Tudose
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 
REST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionGlenn Antoine
 
IRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET Journal
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Charlin Agramonte
 
Subscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsSubscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsdbpublications
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationTamer Rezk
 

Similaire à About HTTP and REST (20)

53 hui homework2
53 hui homework253 hui homework2
53 hui homework2
 
ReST (Representational State Transfer) Explained
ReST (Representational State Transfer) ExplainedReST (Representational State Transfer) Explained
ReST (Representational State Transfer) Explained
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Rest surekha
Rest surekhaRest surekha
Rest surekha
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST Assured
 
Remoting and serialization
Remoting and serializationRemoting and serialization
Remoting and serialization
 
Unit 2
Unit 2Unit 2
Unit 2
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
Efficient Spring Data REST Development
Efficient Spring Data REST DevelopmentEfficient Spring Data REST Development
Efficient Spring Data REST Development
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
REST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of Confusion
 
REST API
REST APIREST API
REST API
 
A REST API (also called a RESTful API or RESTful web API) is an application p...
A REST API (also called a RESTful API or RESTful web API) is an application p...A REST API (also called a RESTful API or RESTful web API) is an application p...
A REST API (also called a RESTful API or RESTful web API) is an application p...
 
IRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce Site
 
Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5Xamarin Workshop Noob to Master – Week 5
Xamarin Workshop Noob to Master – Week 5
 
Marata
MarataMarata
Marata
 
ReSTful API Final
ReSTful API FinalReSTful API Final
ReSTful API Final
 
Subscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robotsSubscription based control system to automate management of events for robots
Subscription based control system to automate management of events for robots
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 

Plus de Maggie Georgieva

Creating a Successful Brand on Social Media with Remarkable Stories
Creating a Successful Brand on Social Media with Remarkable StoriesCreating a Successful Brand on Social Media with Remarkable Stories
Creating a Successful Brand on Social Media with Remarkable StoriesMaggie Georgieva
 
How to Craft An Effective Landing Page and Pitch
How to Craft An Effective Landing Page and PitchHow to Craft An Effective Landing Page and Pitch
How to Craft An Effective Landing Page and PitchMaggie Georgieva
 
From prospect to evangelist
From prospect to evangelistFrom prospect to evangelist
From prospect to evangelistMaggie Georgieva
 
Reshaping the media landscape
Reshaping the media landscapeReshaping the media landscape
Reshaping the media landscapeMaggie Georgieva
 
Alumni Embrace International Opportunities
Alumni Embrace International OpportunitiesAlumni Embrace International Opportunities
Alumni Embrace International OpportunitiesMaggie Georgieva
 
Peculiarities of education abroad
Peculiarities of education abroadPeculiarities of education abroad
Peculiarities of education abroadMaggie Georgieva
 
Social Networks in World Politics and Economics
Social Networks in World Politics and EconomicsSocial Networks in World Politics and Economics
Social Networks in World Politics and EconomicsMaggie Georgieva
 
Falling Value of the Euro Affects Students
Falling Value of the Euro Affects StudentsFalling Value of the Euro Affects Students
Falling Value of the Euro Affects StudentsMaggie Georgieva
 
How Holidays Change for International Students
How Holidays Change for International StudentsHow Holidays Change for International Students
How Holidays Change for International StudentsMaggie Georgieva
 
How International Students Celebrate in The US
How International Students Celebrate in The USHow International Students Celebrate in The US
How International Students Celebrate in The USMaggie Georgieva
 
Employment for International Students
Employment for International StudentsEmployment for International Students
Employment for International StudentsMaggie Georgieva
 
African and Caribbean Day at Mount Holyoke
African and Caribbean Day at Mount HolyokeAfrican and Caribbean Day at Mount Holyoke
African and Caribbean Day at Mount HolyokeMaggie Georgieva
 

Plus de Maggie Georgieva (19)

Creating a Successful Brand on Social Media with Remarkable Stories
Creating a Successful Brand on Social Media with Remarkable StoriesCreating a Successful Brand on Social Media with Remarkable Stories
Creating a Successful Brand on Social Media with Remarkable Stories
 
How to Craft An Effective Landing Page and Pitch
How to Craft An Effective Landing Page and PitchHow to Craft An Effective Landing Page and Pitch
How to Craft An Effective Landing Page and Pitch
 
Happy Baba Marta!
Happy Baba Marta!Happy Baba Marta!
Happy Baba Marta!
 
From prospect to evangelist
From prospect to evangelistFrom prospect to evangelist
From prospect to evangelist
 
Reshaping the media landscape
Reshaping the media landscapeReshaping the media landscape
Reshaping the media landscape
 
PR Portfolio
PR PortfolioPR Portfolio
PR Portfolio
 
Print Lay-Outs
Print Lay-OutsPrint Lay-Outs
Print Lay-Outs
 
Alumni Embrace International Opportunities
Alumni Embrace International OpportunitiesAlumni Embrace International Opportunities
Alumni Embrace International Opportunities
 
Peculiarities of education abroad
Peculiarities of education abroadPeculiarities of education abroad
Peculiarities of education abroad
 
Social Networks in World Politics and Economics
Social Networks in World Politics and EconomicsSocial Networks in World Politics and Economics
Social Networks in World Politics and Economics
 
Falling Value of the Euro Affects Students
Falling Value of the Euro Affects StudentsFalling Value of the Euro Affects Students
Falling Value of the Euro Affects Students
 
How Holidays Change for International Students
How Holidays Change for International StudentsHow Holidays Change for International Students
How Holidays Change for International Students
 
Women's Image Globally
Women's Image GloballyWomen's Image Globally
Women's Image Globally
 
How International Students Celebrate in The US
How International Students Celebrate in The USHow International Students Celebrate in The US
How International Students Celebrate in The US
 
Study Abroad
Study AbroadStudy Abroad
Study Abroad
 
Looking back at 2009
Looking back at 2009Looking back at 2009
Looking back at 2009
 
Employment for International Students
Employment for International StudentsEmployment for International Students
Employment for International Students
 
Languages
LanguagesLanguages
Languages
 
African and Caribbean Day at Mount Holyoke
African and Caribbean Day at Mount HolyokeAfrican and Caribbean Day at Mount Holyoke
African and Caribbean Day at Mount Holyoke
 

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

About HTTP and REST

  • 1. HTTP The protocol that allows for sending docs back and forth on the web.
  • 2. client role server role
  • 3. client role server role initiates responds interaction
  • 5. includes metadata and HTTP methods header body includes data you want to transfer (text, pics, HTML, XML)
  • 6. The response specifies the content type of the body in the Content Type field (e.g. text/html or application/json)
  • 7. HTTP REQUEST METHODS GET POST PUT DELETE
  • 8. HTTP REQUEST METHODS GET POST PUT DELETE queries the changes produces new deletes representation the state of or replaces resources of a resource a resource content of existing resources (idempotent)
  • 9. REST Representational State Transfer: using the principles of the World Wide Web to build applications
  • 10. REST ful web services try to leverage HTTP in its entirety using specific architectural principles
  • 12. 1 Designer starts with nothing (blank) and builds 2 an architecture from familiar components. 2 Designer starts with the system needs and applies constraints to elements of the system.
  • 13. REST 2 Designer starts with the system needs and applies constraints to elements of the system.
  • 14. CONSTRAINTS 1 2 3 4 5 6
  • 15. 1 Client-server Architecture A server component offering services, listens for requests upon these services. A client component desires that a service be performed, sends a request to the server via a connector. client server triggering process reactionary process
  • 16. initiates interaction by responds to the request sending a request for a by either performing the service to be performed service or rejecting it client role server role This separation allows for the two components to evolve independently, which increases scalability.
  • 17. 2 Stateless Communication Each request from the client must contain all necessary information to understand the request. This constraint induces: • Visibility – need to look at only one request to get the full nature of the request • Reliability – eases the task of recovering from failures • Scalability – not having to store data between requests allows the server to free resources
  • 18. 3 Cache Cache constraints require that the data within a response to a request be labeled as cacheable or non-cacheable. If a response is cacheable, a client cache is given the right to reuse the response data for later, equivalent requests. Cache constraints eliminate some interactions and improve efficiency and scalability. Cache can decrease reliability because of stale data.
  • 19. 4 Uniform Interface 1. Identification of resources A resource is any information that can be named. An example of a resource is the current weather in Austin, TX. Resource identification requires the same authority who maintains the reference to a resource to also be responsible for preserving meaning of that resource. 2. Manipulation of resources through representations The resources must be manipulated via representations. A client has no access to a resource directly, it can only send and receive representations from the server. (An example of a representation is an html page with a PNG image of the current weather in Austin, TX.)
  • 20. Data Element Modern Web Examples resource the intended conceptual target of a hypertext reference resource identifier URL, URN representation HTML document, JPEG image representation metadata media type, last-modified time resource metadata source link, alternates, vary control data if-modified-since, cache-control
  • 21. Connector Modern Web Examples client libwww, libwww-perl server libwww, Apache, API, NSAPI cache browser cache, Akamai cache network resolver bind (DNS lookup library) tunnel SOCKS, SSL after HTTP CONNECT
  • 22. 3. Self-descriptive messages States that all messages must include metadata which describe the meaning of the message. 4. Hypermedia as the engine of application state The steps in a REST architecture must be invoked through hypermedia. More specifically, in order for an application’s process to move a step, it must invoke that next step from a reference inside the current representation.
  • 23. 1 Render the data where it’s located and send a fixed-format image to the recipient 3 options for a distributed hypermedia 2 Encapsulate the data with a rendering engine and send both to the recipient 3 architect Send the raw data to the recipient along with metadata that describes the data type so that the recipient can choose their own rendering engine
  • 24. 5 Layered System Layered system style allows an architecture to be composed of hierarchical layers by constraining component behavior so each component cannot ‘see’ beyond the immediate layer with which they are interacting. Layered system style helps reduce complexity and promote independence. Layers can be used to protect new services from legacy clients. They can also add overhead.
  • 25. 6 Code on Demand REST allows client functionality to be extended by downloading and executing code in the form of scripts.
  • 27. Download Simple REST Client Simple REST Client is a plugin for Chrome. Once installed, you should have a button in the toolbar.
  • 28.
  • 29. What else do you need? • The API POST URL • A POST string • Content Type header
  • 30.

Notes de l'éditeur

  1. If the API is working, your should see a Response section appear at the bottom.  You should see Status: 200 OK, a Headers: field, and a Data: field containing something like this:<html><body>Lead has been successfully added to HubSpot<br/>submissionGuid=4dd4e3b251914c92aeb737d815b307c2</body></html>