rest

Best tool/framework for testing a RESTful service

I'm looking for a framework or tool for testing RESTful services. This seems like it shouldn't be hard, but the tools that I've found thus far assume things about my service that they probably shouldn't. What would be great is something that could make a request (like, HTTP POST) and then compare the result with an expected result. I ...

How can I read the custom HTTP status code using WCF REST?

I'm using the ChannelFactory in WCF to call into a REST service and I want to determine whether the server returned HTTP 200 or 201 in response to a PUT call. Currently, the call succeeds, but I can't determine if my object was created or updated. How can I do this? ...

Best/Most Comprehensive API for Stocks/Financial Data

What is the most recommended free/public API for accessing financial market stats and stock quotes (preferrably real-time quotes)? I'm not too picky about how it's exposed (SOAP, REST, some proprietary XML setup, etc.), as long as it's got some decent documentation. I'm planning to build a simple web dashboard in PHP with some basic dat...

What is the best way to return errors from a WCF service in a RESTful way?

Using WCF in a RESTful way seems great. I’m a big fan of the big guns like simplicity and flexibility, but I also love the way the Urls end up looking. What can I say, I’m a programmer. The simple API for retrieving and editing resources is matched by an almost equally simple set of possible error responses, and I can’t help feeling tha...

What type of service should I use for Silverlight 2 data?

There is ASMX, WCF, REST, and ADO.NET Data Services... I've used WCF and ASMX succesfully with Silverlight 2, but what about the others? What are the pros and cons of using each type of service with Silverlight 2? ...

REST URIs and operations on an object that can be commented on, tagged, rated, etc.

I'm doing research into a web API for my company, and it's starting to look like we might implement a RESTful one. I've read a couple of books about this now (O'Reilly's "RESTful web services" seeming the most useful) and have come up with the following set of URIs and operations for an object that can be commented on, tagged, and rated....

Haskell REST/GDATA API library

Is there available REST api library for haskell? I need it primary for google gdata client, but will probably use it for other purposes too. I know there is HTTP library, but I need something more high level, which supports things like json encoding/decoding, etc... ...

Accessing Erlang business layer via REST

For a college project i'm thinking of implementing the business layer in Erlang and then accessing it via multiple front-ends using REST. I would like to avail of OTP features like distributed applications, etc. My question is how do I expose gen_server calls/casts to other applications? Obviously I could make RPC calls via language spe...

What is the restful approach to compose a group by query

consider the following http request: GET /defects?group-by=priority I would like the returned collection(feed) of defects to be grouped by their priority. i.e. the returned feed consists of defects(resources) and group infromation. I thought about something that will return the groups' titles and count before returning the collection...

How can an authentication key be passed to a restful web service?

Some existing web services I consume have methods that look something like this: List<Employee> employees = employeeService.GetEmployees(accessKey, allDepartments); The accessKey serves two purposes; it acts as both authentication and identification. Only valid access codes are responded to (authentication) and it services a...

In Rails, how do you use RESTful controllers with Haml?

I'm getting started on figuring out how to use RESTful design. I have this action: # GET /feedback_messages # GET /feedback_messages.xml def index page = params[:page] page ||= 1 @feedback_messages = FeedbackMessage.paginate( :all, :page => page, :per_page => 20, :order => 'updated_at' ) respond_to do |format|...

REST interface for finding average

Suppose I want to create a REST interface to find the average of a list of numbers. Assume that the numbers are submitted one at a time. How would you do this? POST a number to http://site.com/api/average If this is the first number a hash will be returned POST a number to http://site.com/api/average/hash .... GET http://site.com/api/a...

How would I add new data via a REST service opposed to RPC style service?

I'm still learning about REST and, in my test, came up with this scenario I don't know how to deal with. I have an existing sample WCF service which uses Linq-to-Sql. Its a tremendously simple database with a single table called "Tasks" which has four fields: Id, Description, IsCompleted, and EnteredDate. (I mentioned this because I ha...

I'm confused about HTTP caching.

I've been thinking about batch reads and writes in a RESTful environment, and I think I've come to the realization that I have broader questions about HTTP caching. (Below I use commas (",") to delimit multiple record IDs, but that detail is not particular to the discussion.) I started with this problem: 1. Single GET invalidated by b...

Rails: how do you access RESTful helpers?

I'm trying to work through this guide to Rails routing, but I got stuck in section 3.3: Creating a RESTful route will also make available a pile of helpers within your application and then they list some helpers like photos_url, photos_path, etc. My questions: Where can I find the complete list of helpers that is "made available?...

Adding and Updating with LINQ to Entities

We are using L2E and REST in our project, and while I have been able to retrieve data from the db without issue, I am still not able to update or add new records to the db. I imagine that it's a syntax problem (we're still new to to linq), but I haven't been able to figure it out. We initially load the data in the dataservicecontext, a...

Special Characters in WCF REST ATOM Feed

I have a WCF ATOM Feed Service using the WCF REST Toolkit with the following UriTemplate [WebGet(UriTemplate = "{category}/?numItems={numItems}")] public Atom10FeedFormatter GetFeedByCategory(string category, int numItems) Most cases work, the edge is when I try to load the feed based on the category with a # sign. I am loading cours...

REST web service accepting a POST using Restlet - Best Practice

I have my resource and they typical overridden method to handle POST requests. public void acceptRepresentation(Representation rep) { if (MediaType.APPLICATION_XML.equals(rep.getMediaType())) { //Do stuff here } else { //complain! } } What I want to know is the best practice to handle my packet of XML. I see a lo...

Can WCF REST services support deserialisation of XML messages with arbitrary element order?

I have a C# WCF REST Service which allows the addition of a bookmark, by sending an HTTP POST request with the bookmark serialised in XML. I have specified the operation contract for the service, which picks up the xml and automatically deserialises the object for me. My problem is that the deserialisation only works correctly if the XML...

How do I encode URI parameter values?

I want to send a URI as the value of a query/matrix parameter. Before I can append it to an existing URI, I need to encode it according to RFC 2396. For example, given the input: http://google.com/resource?key=value1 & value2 I expect the output: http%3a%2f%2fgoogle.com%2fresource%3fkey%3dvalue1%2520%26%2520value2 Neither java.net.UR...