Hi !

I'm trying to return a simple 201 Created status to the caller, but I 
can't seem to do it.  I use curl from the command line with the 
--verbose option, and the response is really 200 OK.

My controller code:

class Observations < Application
   def create(feature, node, observation_type)
     # Do some work...

     response.status = "201 Created"
     ""
   end
end

And the curl output:

$ curl -v http://localhost:4000/observations -d feature=www -d 
node=andromede -d observation_type=mem:used -d value=632243
* About to connect() to localhost port 4000 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 4000 (#0)
 > POST /observations HTTP/1.1
 > User-Agent: curl/7.16.4 (i486-pc-linux-gnu) libcurl/7.16.4 
OpenSSL/0.9.8e zlib/1.2.3.3 libidn/1.0
 > Host: localhost:4000
 > Accept: */*
 > Content-Length: 65
 > Content-Type: application/x-www-form-urlencoded
 >
< HTTP/1.1 200 OK
< Connection: close
< Date: Thu, 13 Dec 2007 14:51:30 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 0
<
* Closing connection #0

The controller code is executed no problem, but I'm just wondering about 
that status code.

Thanks !
--
François Beausoleil
http://blog.teksol.info/
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to