Hi Jon,
hit a couple of errors. On example
5.ru (minus OAuthFilter and
OpenIDFilter) I get the following errors attempting a POST to /notes
Case 1)
RestClient.post "
http://localhost:9000/notes", "[1,2,3,4,5]",
{:content_type=>"application/json"}
Exception `ArgumentError' at (eval):3 - Invalid String value
Response: #<CloudKit::Response:0x1a19db0 @status=500,
@content="{\"error\":\"unknown server error\"}", @meta={"Content-
Type"=>"application/json", "Cache-Control"=>"no-cache"}>
Exception `ArgumentError' at /opt/local/lib/ruby/gems/1.8/gems/
rack-0.9.1/lib/rack/session/abstract/id.rb:91 - Response is not an
array.
ArgumentError: Response is not an array.
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/session/
abstract/id.rb:91:in `commit_session'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/session/
abstract/id.rb:49:in `context'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/session/
abstract/id.rb:42:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/session/
abstract/id.rb:42:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:45:in
`_call'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/lint.rb:33:in
`call'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/
showexceptions.rb:23:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/commonlogger.rb:
20:in `_call'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/commonlogger.rb:
13:in `call'
/opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/connection.rb:
63:in `pre_process'
/opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/connection.rb:
54:in `process'
/opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/connection.rb:
39:in `receive_data'
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/
eventmachine.rb:240:in `run_machine'
/opt/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.6/lib/
eventmachine.rb:240:in `run'
/opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/backends/
base.rb:57:in `start'
/opt/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/server.rb:
150:in `start'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/handler/thin.rb:
11:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/bin/rackup:172
/opt/local/bin/rackup:19:in `load'
/opt/local/bin/rackup:19
127.0.0.1 - - [11/Mar/2009 23:48:31] "POST /notes HTTP/1.1" 500 54727
0.1848
Case 2)
If I do a RestClient.post "
http://localhost:9000/notes", "{\"id\":\"one
\"}", {:content_type=>"application/json"} instead, the exception above
isn't show but the following is output instead:
Exception `ArgumentError' at (eval):3 - NULL pointer given
127.0.0.1 - - [11/Mar/2009 23:50:07] "POST /notes HTTP/1.1" 201 159
0.0078
It does store the data as
RestClient.get "
http://localhost:9000/notes/f27707f0-f0ff-012b-
c3ac-000d932a964c"
=> "{\"id\":\"one\"}"
What could be going on here!?
Thanks & cheerio, Harry.