-
Notifications
You must be signed in to change notification settings - Fork 221
POST and PUT not working #1
Comments
I'm pretty sure you have to send the body data URL-encoded or multipart - |
@maciejnowak22 I've implemented support for JSON and zlib'ed payloads in ArrestDB if you still need it. |
Hi there, |
@roestigraben , so my body looks sth like this:
"key=value&anotherKey=anoutherValue"
where keys are column names in database. thnx a lot for your effort! solutions with url-encoded was enough for me. If i will meet in future similar task ArrestDB will be considered as first. |
@maciejnowak22
Now I just need to code my AngularJS $resource parameters such that it does the same as with jQuery (or with another REST console). |
when trying to insert data into db using following request:
POST /testowa1 HTTP/1.1 Host: localhost:8888 User-Agent: CocoaRestClient/11 CFNetwork/596.3.3 Darwin/12.3.0 (x86_64) (****************) Content-Length: 33 Accept: application/json Content-Type: application/json Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive
`{ "id":4,"column" : "POST"}`i'm getting response:
HTTP/1.1 200 OK Date: Thu, 18 Apr 2013 00:19:26 GMT Server: Apache X-Powered-By: PHP/5.4.10 Content-Length: 45 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
`{"error":{"message":"No Content","code":204}}`i'm using MAMP apache, and mysql. Tried on table with auto_incement index and one inserted manually, PUT and POST seems to not working (with the same err).
GET and DELETE works great
f.e.
using
GET
forhttp://localhost:8888/table/3
causes following response:HTTP/1.1 200 OK
Date: Thu, 18 Apr 2013 00:30:22 GMT
Server: Apache
X-Powered-By: PHP/5.4.10
Content-Length: 28
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json
{"id":"3","column":"asdfg"}
The text was updated successfully, but these errors were encountered: