What is the difference between resource and endpoint?

后端 未结 6 1118
死守一世寂寞
死守一世寂寞 2021-01-29 18:02

I have heard both \"resource\" and \"endpoint\" to refer to the same thing. It seems that resource is a newer term.

What is the difference between them? Does \"resource\

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-29 18:14

    1. Resource description “Resources” refers to the information returned by an API.

    2. Endpoints and methods The endpoints indicate how you access the resource, while the method indicates the allowed interactions (such as GET, POST, or DELETE) with the resource.

    Additional info: 3. Parameters Parameters are options you can pass with the endpoint (such as specifying the response format or the amount returned) to influence the response.

    4. Request example The request example includes a sample request using the endpoint, showing some parameters configured.

    5. Response example and schema The response example shows a sample response from the request example; the response schema defines all possible elements in the response.

    Source- Reference link

提交回复
热议问题