That is just a style choice by developers. A webserver can abitrarily choose how it wants to react to a GET request like http://mysite.com/data=xyz
.
But if this confuses you, that’s actually very good, because it shows that it goes against your gut instincts to upload / create a new data point with a GET
request and not using one of the other HTTP methods / verbs, like POST
and PUT
. The RESTful design philosophy for creating Web APIs states how the verbs should be used – GET
to retrieve a resources/ information, POST
to create a new one, PUT
to update, etc.
And in fact the above first link says that the URL supports both GET and POST methods.
HTTP Method
POST
orGET
…
Content-TypeContent-Type is required only for the POST method, not for the GET method.
application/x-www-form-urlencoded
for most updates.
application/json
for updates in JSON format.
…So, they kinda follow the RESTful design philosophy, by accepting both POST and GET requests.