Giter Club home page Giter Club logo

apis's Introduction

RESTful APIs

  • REST stands for Representational State Transfer.
  • It's an architectural style introduced by _Roy Fielding in 2000_.
  • REST principles:
    • Uniform Interface: Resources are only accessible as representations and the rules for processing that representation are described through self-descriptive messages.
    • Stateless: Every client request to the server is self-contained and subsequent requests do not require information from prior requests.
    • Client-Server: A client and server must be present in the architecture.
    • Cacheable & Layered System: Caching and other techniques are utilized in order to increase network efficiency.

HTTP basics

  • Hypertext Transfer Protocol (HTTP) is a protocol that provides a standardized way for computers to communicate with each other. It has been the foundation for data communication over the internet since 1990 and is integral to understanding how client-server communication functions.

  • Features:

    • Connectionless: When a request is sent, the client opens the connection; once a response is received, the client closes the connection. The client and server only maintain a connection during the response and request. Future responses are made on a new connection.
    • Stateless: There is no dependency between successive requests.
    • Not Sessionless: Utilizing headers and cookies, sessions can be created to allow each HTTP request to share the same context.
    • Media Independent: Any type of data can be sent over HTTP as long as both the client and server know how to handle the data format. In our case, we'll use JSON.
  • Elements:

    • Universal Resource Identifiers (URIs): An example URI is http://www.example.com/tasks/term=homework. It has certain components:
    • Scheme: specifies the protocol used to access the resource, HTTP or HTTPS. In our example http.
    • Host: specifies the host that holds the resources. In our example www.example.com.
    • Path: specifies the specific resource being requested. In our example, /tasks.
    • Query: an optional component, the query string provides information the resource can use for some purpose such as a search parameter. In our example, /term=homework.

URLs


Python achives

apis's People

Contributors

zulrich91 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.