What is the difference between resource and endpoint?

后端 未结 6 1070
死守一世寂寞
死守一世寂寞 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:18

    Possibly mine isn't a great answer but here goes.

    Since working more with truly RESTful web services over HTTP, I've tried to steer people away from using the term endpoint since it has no clear definition, and instead use the language of REST which is resources and resource locations.

    To my mind, endpoint is a TCP term. It's conflated with HTTP because part of the URL identifies a listening server.

    So resource isn't a newer term, I don't think, I think endpoint was always misappropriated and we're realising that as we're getting our heads around REST as a style of API.

    Edit

    I blogged about this.

    https://medium.com/@lukepuplett/stop-saying-endpoints-92c19e33e819

提交回复
热议问题