Comments on: simple web services with rails /2009/06/simple-web-services-with-rails/ Sarah Allen's reflections on internet software and other topics Mon, 20 Feb 2012 18:41:14 +0000 hourly 1 https://wordpress.org/?v=5.7.1 By: Ed /2009/06/simple-web-services-with-rails/#comment-533 Mon, 20 Feb 2012 18:41:14 +0000 /?p=1533#comment-533 I’m new to Rails and plans eventually include providing web services from/to a simple Rails app. I’m amazed at what you’ve described here. You’re issuing your curl commands on the same machine that’s running Rails. Can you point me to a good resource that covers “getting in the door” to Rails from another machine to issue equivalent commands? Thanks much!

Ed
Philadelphia

]]>
By: jgpawletko /2009/06/simple-web-services-with-rails/#comment-532 Mon, 07 Feb 2011 01:56:46 +0000 /?p=1533#comment-532 Many thanks from a Rails noob.
Your write-up helped me solve a problem I was having with POSTing XML to a
Rails 3.0 app I’m developing.

]]>
By: Tom Rossi /2009/06/simple-web-services-with-rails/#comment-531 Mon, 22 Jun 2009 20:18:12 +0000 /?p=1533#comment-531 This method of testing with cron is definitely valuable! I was just wondering how I could test (preferably without a plugin). It would seem like with all the emphasis on REST and on testing, that the framework would make it a little easier to test something like your app responding to an xml post.

]]>
By: Sarah /2009/06/simple-web-services-with-rails/#comment-530 Mon, 22 Jun 2009 20:07:31 +0000 /?p=1533#comment-530 I absolutely agree that this kind of thing belongs in your test suite. Thanks for pointing that out. I’m fond of cucumber for testing this kind of thing (since it also provides docs for the APIs that you could give to another developer). However, I did this because my tests were failing when they used to succeed and I didn’t understand why… it turned out that there was some syntax change in a version upgrade that led to the http header not being set correctly. In any case, I found that getting back to basics helped me isolate the issue.

]]>
By: Tom Rossi /2009/06/simple-web-services-with-rails/#comment-529 Mon, 22 Jun 2009 19:51:51 +0000 /?p=1533#comment-529 Is there a way to actually do this in your functional test rather than using curl? In other words, rather than calling:

post :create, params

Can we call something like:

post :create, :xml => (object.to_xml)?

That would be nice just so we can jump into a functional test and look at the response.body for debugging.

Thanks,
Tom

]]>