What is an Endpoint?

后端 未结 9 1621
不思量自难忘°
不思量自难忘° 2020-12-04 04:39

I have been reading about OAuth and it keeps talking about endpoints. What is exactly an endpoint?

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 05:22

    Come on guys :) We could do it simpler, by examples:

    /this-is-an-endpoint
    /another/endpoint
    /some/other/endpoint
    /login
    /accounts
    /cart/items
    

    and when put under a domain, it would look like:

    https://example.com/this-is-an-endpoint
    https://example.com/another/endpoint
    https://example.com/some/other/endpoint
    https://example.com/login
    https://example.com/accounts
    https://example.com/cart/items
    

    Can be either http or https, we use https in the example.

    Also endpoint can be different for different HTTP methods, for example:

    GET /item/{id}
    PUT /item/{id}
    

    would be two different endpoints - one for retrieving (as in "cRud" abbreviation), and the other for updating (as in "crUd")

    And that's all, really that simple!

提交回复
热议问题