-
Notifications
You must be signed in to change notification settings - Fork 0
06 HTTP and REST
- Application Program Interface
- Contract provided by one piece of software to another
- Structured request and response
- Representational State Transfer
- Architecture style for designing networking applications
- Relies on a stateless, client-server protocol, almost always HTTP
- Treats server object as resources that can be created or destroyed
-
GET: Retrieve data from a specified resource
-
POST: Submit data to be processed to a specificed resource
-
PUT: Update a specified resource
-
DELETE: Delete a specified resource
-
HEAD: Same as get but does not return a body
-
TRACE: Used to retrieve the hops that a request takes to round trip from the server. Each intermediate proxy or gateway would inject its IP or DNS name into the
Viaheader field. This can be used for diagnostic purposes. -
OPTIONS: Used to retrieve the server capabilities. On the client-side, it can be used to modify the request based on what the server can support. Returns the supported HTTP methods
-
PATCH: Update partial resources
The uri/url where api/service can be accessed by a client application
Some API's require authentication to use their service. This could be free or paid.
Gets access token and passed that along with each request to API.