rest

Get Request Attributes in Restlet 2.0

I'm using Restlet to make a RESTful platform. I haven't used it before, but I decided to use 2.0 because it is better to start with the latest and greatest technology, right? The key thing I am looking for is the ability to have someone to put in a URL like http://mysite/New%20York/3 and have the service respond with something like [Ne...

Fine Grained rest HTTP verbs browser support

Is there any data regarding how browsers actually support rest http verbs (especially PUT, DELETE). This question is mostly motivated by the fact that many sources (such as this stackoverflow answer) inform that most browsers don't suport PUT and DELETE but don't say which. Rails solves this using a patch on the client, and reversing th...

How to design a RESTful HTTP gateway for a protocol that requires persistent connections?

I'm working with a persistent client/server protocol and I need to design a RESTful gateway. I don't have a lot of experience designing REST interfaces and I don't understand how I should handle (in a RESTful way) the session IDs needed to maintain persistent connections on the server and how I should represent server state as resources....

RoR: I'm having trouble doing a simple link to an action

I am trying to link to action addData in the entries controller. I have constructed the link like this: <%= link_to image_tag (w.link, :border =>0) ,:controller => :entries, :action => :addData %> but when I click on the link, I get this error: Couldn't find Entry with ID=addData I'm pretty sure this is because I have a restful d...

Looking For An API That Will Feed Me Soccer Stats

Hello, I am looking for an API that will feed me soccer stats from leagues like the EPL, Bundesliga, Serie A, and La Liga such as personal player information (name, height, weight, dob, etc.), player statistics (goals, assists, minutes played), as well as results from games. If anyone knows of a service (maybe even sites like premierlea...

Rails REST API design question

I am designing a REST api for one of my applications & considering using RoR for the same and had a few questions that I was wondering if Rails can support before I can decide on RoR - 1) does rails support setting HTTP response code status. So I want something like this if customer_save_fail response.status_code = 500 end 2) in rai...

RESTful HTTP: Showing different representations to two users on the same URI

I'm designing a hypermedia API, yes, a RESTful API, with the hypertext constraint. Each user of the system will access the system using their own credentials, so every request we process is authenticated and authorized. Each user will typically have specific credentials so that they may have different permissione (e.g. none, read, read...

Flickr Geo queries not returning any data

I cannot get the Flickr API to return any data for lat/lon queries. view-source:http://api.flickr.com/services/rest/?method=flickr.photos.search&amp;media=photo&amp;api_key=KEY_HERE&amp;has_geo=1&amp;extras=geo&amp;bbox=0,0,180,90 This should return something, anything. Doesn't work if I use lat/lng either. I can get some photos return...

Any good RADAR (RESTful Application, Dumb-Ass Recipient) applications?

I would like to study the client code of a RADAR web application. (RADAR stands for RESTful Application, Dumb-Ass Recipient). This means that there are only a rellatively small handful of HTML pages, the application backend spends most of its time sending out data in JSON or XML format in response to AJAX requests from the browser clien...

asp.net MVC 2.0 REST service with FormCollection

Hi there, Let's say the Action below is exposed via REST service and is called from a different appliation how would it handle the posted data/object? Should I use Create(FormCollection collection) here? [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(Member member) { .... } ...

REST methods not accessible when hosting wcf service in IIS

I have a WCF REST service that exposes a method in class GreetService: [ServiceContract] public class GreetService { [WebGet(UriTemplate = "greet/{name}")] public String GreetName(string name) { return "Hello " + name; } } Also, I registered a route in Global.asax: RouteTable.Routes.Add(new ServiceRoute("Greet...

Consuming REST service with .NET 4 Client Profile

What's the easiest/best way to consume a RESTful service from a .NET client application using the .NET 4 Client Profile? Everything I have found ends up pushing me towards the full framework: WCF REST Starter Kit. HttpClient class requires full framework. WebChannelFactory<> is in System.ServiceModel.Web, now removed from the Client ...

Python httplib ResponseNotReady

I'm writing a REST client for elgg using python, and even when the request succeeds, I get this in response: Traceback (most recent call last): File "testclient.py", line 94, in <module> result = sendMessage(token, h1) File "testclient.py", line 46, in sendMessage res = h1.getresponse().read() File "C:\Python25\lib\httplib...

Excluding private data in RESTful response

What is the best practice for excluding certain fields/data in a RESTful response if the user requesting it shouldn't be able to see all of the data? Example: Person has a First Name, Last Name, and Date of Birth. Both authenticated and non-authenticated users can make RESTful requests to /people.xml to get a full list of people. Howe...

How to deal with merged objects/resources in a web app and in a RESTful API?

I have a web app that has lots of pages with a URL of the form /object_type/object_id/ which show this objects details. I also have a RESTful API, returning a JSON/XML representation of my objects (under /api/object_type/object_id/ ). (My objects are Laws and Bills, but I guess this question is rather generic). From time to time, I disc...

Does the REST architectural style require physically separate clients and servers?

Is it a requirement that RESTful interactions occur between physically separate clients and servers? i.e. does the interaction need to involve the network stack in some way? Is there any benefit to employing an HTTP-like "calling convention" between the various components of an application? It seems to me that the benefits of REST, su...

Python RESTful client with CAS authentication

I'm trying to build a python library for interacting with our RESTful API, but it uses CAS for client auth, and I haven't been able to find any good existing libraries for it. So far I've found the following links, but I'm not sure if they're intended to be used in clients or by a website that uses CAS itself. Does anyone have any advice...

ADO Data Services and automatic help page generation for the REST API ?

The WCF Starter kit can auto generate a help page based on the REST API. See this: Once you’re using WebServiceHost2, your services will automatically enjoy the benefits of the new automatic help page functionality ( http://msdn.microsoft.com/en-us/library/ee391967.aspx ) However, I am wondering if there is a way to do this w...

Is it possible to use JAX-RS as a web framework?

I've been looking into JAX-RS lately because I really like the Java platform and a RESTful style of web development. I've read a lot about using JAX-RS for creating RESTful Web Services, but is it possible to use JAX-RS to create RESTful web sites? I guess more specifically, is it possible to use JAX-RS as a controller (to retrieve requi...

Connectedness & HATEOAS

It is said that in a well defined RESTful system, the clients only need to know the root URI or few well known URIs and the client shall discover all other links through these initial URIs. I do understand the benefits (decoupled clients) from this approach but the downside for me is that the client needs to discover the links each time ...