Fórum Root.cz
Hlavní témata => Vývoj => Téma založeno: martin 05. 01. 2014, 03:19:07
-
Potrebuju pres HTTP posilat jednoduchy JSON s daty na server, kde je budu dal zpracovavat. Odesilaci zarizeni bude Arduino a pujde o namerene hodnoty. Zda se vam lepsi data posilat pres HTTP POST, nebo HTTP PUT?
Pripadne na to jdu blbe a ma to byt upne jinak? A jak?
POST http://example.net/data HTTP/1.0
Host: example.net
Connection: close
Content-Length: 72
Content-Type: application/json
{"user":"test@example.net",...
PUT http://example.net/data HTTP/1.0
Host: example.net
Connection: close
Content-Length: 72
Content-Type: application/json
{"user":"test@example.net",...
Jaky je spravny mime type? Content-Type: application/jsonrequest nebo Content-Type: application/json ?
-
http://stackoverflow.com/questions/630453/put-vs-post-in-rest
POST.
Kdyby to bylo posilane na http://example.com/data/201401040800 tak PUT.
-
Jaky je spravny mime type? Content-Type: application/jsonrequest nebo Content-Type: application/json ?
Content-Type: application/json