Earlier quoted context omitted.
sure we have. have you read through the developer docs for most API's? here's twitters: https://dev.twitter.com/docs/api/1.1 its all GET and POST. this is typical.
Okay, here's Google Drive's https://developers.google.com/drive/v2/reference/ it uses GET, POST, PATCH, PUT, and DELETE Here's (part of) the Amazon S3 API: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketOps... http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectOps... HEAD, GET, DELETE, PUT, POST
Let's remove verbs from HTTP 2.0
111–120 of 141 posts
Re: Let's remove verbs from HTTP 2.0
#112Earlier quoted context omitted.
The Web Linking RFC [1] uses it to do discovery. The HEAD is mainly used to get ahold of the "Link" response header. > HEAD / HTTP/1.1 ; rel="self service"; title="Foobar!", ; rel="collection"; id="users" > HEAD /users HTTP/1.1 ; rel="up service"; title="Foobar!", ; rel="self collection"; id="users" ; rel="item"; id="bob" > GET /bob HTTP/1.1 ... GET can't support that process, so that's just one reason why I'm agains…
Why can't GET support that process? You'd have the extra bytes of the content, but there's nothing stopping the server sending the Link header in response to a GET request.
Re: Let's remove verbs from HTTP 2.0
#113Earlier quoted context omitted.
Okay, here's Google Drive's https://developers.google.com/drive/v2/reference/ it uses GET, POST, PATCH, PUT, and DELETE Here's (part of) the Amazon S3 API: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketOps... http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectOps... HEAD, GET, DELETE, PUT, POST
And that makes the API better because...?
The discussion of the merits of the verbs aside from their frequency of use in APIs is on other subthreads.
Re: Let's remove verbs from HTTP 2.0
#114Earlier quoted context omitted.
I just wrote a REST API for my company and used PUT and DELETE (Tomcat doesn't support PATCH yet). Plenty of DELETE in Stripe's API: https://stripe.com/docs/api#delete_recipient Github uses HEAD, PATCH, PUT, and DELETE: http://developer.github.com/v3/#http-verbs Twilio supports PUT and DELETE: http://www.twilio.com/docs/api/rest/request There are all darlings of the HK community with highly praised, widely used REST…
To be fair to the other poster, I wouldn't be surprised if 99.9% of requests were GET/POST/HEAD.
Re: Let's remove verbs from HTTP 2.0
#115Read Fielding's dissertation please, or any distributed systems text on the basics of RPC. HTTP is for more than just CRUD websites.
Re: Let's remove verbs from HTTP 2.0
#116Earlier quoted context omitted.
To be fair to the other poster, I wouldn't be surprised if 99.9% of requests were GET/POST/HEAD.
And 99.9% of requests are GET rather than POST, so shall we get rid of POST then?
Re: Let's remove verbs from HTTP 2.0
#117Earlier quoted context omitted.
Problem is, in a lot of circumstances, you still have to rely on GET and POST with a header like X-REQUEST-METHOD set to tell the server what you really meant.
Usually, this is not the server not supporting it, its a workaround that the server provides so that you can consume the API without AJAX from HTML forms, which are restricted to GET and POST. EDIT: Although in some cases there is an issue that people choose not to configure it on the web server, and instead use headers or other mechanisms to tunnel the "real" method to the application. But most servers do support it…
Spot on.
Re: Let's remove verbs from HTTP 2.0
#118Earlier quoted context omitted.
I'm sorry, I must have missed the tags. Yes, the comment is embellished, but the only place where GET and POST are the only verbs is in a basic web browser. Step outside that world, and the other verbs are in use every day…and intermediary devices - with no knowledge of the business logic of the target server - accommodate those verbs, with proper behavior for the most part. Moving those to the URL means that interme…
It wasn't really hyperbole, it was just wrong.
Re: Let's remove verbs from HTTP 2.0
#119Earlier quoted context omitted.
Yes, it would be horrible if you instead had to do: POST /user/123/follow
Yeah, if that's where your URL ended. But what if your URLs kept going? Say you had /user/123/followers or /user/123/followers/followers or /user/123/followers/followers/following ? When your URLs have a non-obvious terminus (as is typical of proper REST APIs) it becomes clear that the verb does not belong in the URL path.
FOLLOWERS_FOLLOWERS_FOLLOWING /user/123
Re: Let's remove verbs from HTTP 2.0
#120There are two valid reasons I can think of why the verbs need to be specified somewhere for universal agreement: - So that proxies can potentially retry idempotent requests if the upstream fails. Retrying a partially sent GET should be ok, while retrying a partially sent POST is a terrible idea. It's nice in theory, but in practice only reverse proxies at the application endpoint really have the information necessary…