REST 的挑战在于,虽然动词是标准的(GET、POST 、PUT、DELETE),名词完全是任意的,由编写 URL 结构的人随意决定。我想这就是为什么作者经常创建 RESTFul API 的包装器/特定于语言的实现(例如 Twitter)。
The beauty of REST is that you don't NEED a special client to interact with the API...just anything that can communicate via HTTP.
Requests is the current hotness in Python HTTP Libraries. HTTPLib2 is also very robust
The challenge with REST is that while the verbs are standard (GET, POST, PUT, DELETE), the nouns are completely arbitrary, left to the whims of whoever wrote the URL structure. I guess that's why authors often create a wrapper/language-specific implementation of the RESTFul API (eg Twitter).
发布评论
评论(1)
REST 的美妙之处在于您不需要特殊的客户端来与 API 交互......只需任何可以通过 HTTP 进行通信的东西。
Requests 是 Python HTTP 库中当前的热点。
HTTPLib2 也非常强大
REST 的挑战在于,虽然动词是标准的(GET、POST 、PUT、DELETE),名词完全是任意的,由编写 URL 结构的人随意决定。我想这就是为什么作者经常创建 RESTFul API 的包装器/特定于语言的实现(例如 Twitter)。
The beauty of REST is that you don't NEED a special client to interact with the API...just anything that can communicate via HTTP.
Requests is the current hotness in Python HTTP Libraries.
HTTPLib2 is also very robust
The challenge with REST is that while the verbs are standard (GET, POST, PUT, DELETE), the nouns are completely arbitrary, left to the whims of whoever wrote the URL structure. I guess that's why authors often create a wrapper/language-specific implementation of the RESTFul API (eg Twitter).