rest

RESTful Multiple Updates (Example: Clear a Shopping Cart)?

...

RESTful, efficient way to query List.contains(element)?

Given: /images: list of all images /images/{imageId}: specific image /feed/{feedId}: potentially huge list of some images (not all of them) How would you query if a particular feed contains a particular image without downloading the full list? Put another way, how would you check whether a resource state contains a component without d...

RESTful way to do degradable Multiple Models in a Form in Rails

So far, I've not been able to find a solution that is able to allow a form to interact with two models that have a one-to-many relationship. Say for example, a customer has many items. Currently, I've implemented solutions using Javascript that enables users to add/remove rows to the item list. Let's keep it simple, we're creating new r...

Why the slow WADL uptake?

Hi, I've been researching WADL and am wondering why it isn't more widely adopted? With the rate at which REST usage seems to be growing, I'm surprised that more development efforts don't use it. Is there are fundamental flaw in its design, is it not a good match for the culture that typically surrounds RESTful web services, or is it ...

Security of REST authentication schemes

Background: I'm designing the authentication scheme for a REST web service. This doesn't "really" need to be secure (it's more of a personal project) but I want to make it as secure as possible as an exercise/learning experience. I don't want to use SSL since I don't want the hassle and, mostly, the expense of setting it up. These SO q...

RESTful Grails: how do I include related entities in my XML?

Let's say I have a class called Store that has many Employees. My RESTful listXML method looks like this: def listXML = { render Store.list() as XML } And the result looks like this: <stores> <store id="1"> <name>My Store</name> <employees> <employee id="1" /> </employees> </store> </store> My question is, how...

REST and authentication variants

I am currently working on a REST library for .net, and I would like to hear some opinions about an open point I have: REST and authentication. Here is an example of an RESTful interface used with the library: [RestRoot("/user")] public interface IUserInterface { [RestPut("/")] void Add(User user); [RestGet("/")] int[] List();...

Problems tranforming a REST response to a XDocument

I'm actually playing around with the last.FM web serivce API which I call via REST. When I get the response I try to convert the result into a XDocument so I could use LINQ to work with it. But when I pass the result string to the XDocumnet constructor an ArgumentException is thrown telling me that "Non white space characters cannot be...

Java and other clients for WCF RESTful Services

I am wanting to expose some data service endpoints for internal application use and am debating on WCF REST as a possible solution. What are my options for other languages/platforms as clients? Keeping in mind that I need to service Java, Python and .Net clients. Essentially, I want to be able to demonstrate a single point of organ...

Does Microsoft.ServiceModel.Web only work in GAC?

Hi guys, I created my first WCF RESTful service with just one GetData so I can try, and it works perfectly in localhost, but when I add it to a hosting environment, I get: Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please revie...

How to reference a DLL in the web.config?

Hi guys, I have a DLL in the BIN folder, and I need it to be referenced in the web.config, or I get that annoying error: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Co...

How significant is .NET 3.5 SP1 for WCF/REST?

I just worked through a book on WCF and was surprised that it didn't even mention REST at all. Was REST an afterthought for WCF that was added in .NET 3.5 SP1 and hence not baked in well or is it well integrated? I assume that Silverlight and XBAPs can consume WCF with no problem or do they have some limitation due to their sandbox env...

How to execute the "less popular" HTTP actions in a RESTful web app?

I'm developing a Python web app as a learning exercise, and I am looking into making my app RESTful. To that end, I want to be able to handle various types of HTTP actions/verbs where they are applicable. For example, if widget with id 12 is represented with the URI http://domain/widget/12, and I want to give the end user the ability t...

Modelling REST with hierarchy

How would one model resources that are hierarchical? Assume for example that a person has a "message board" and that a "message" is a resource. Let's say that the "message" can have replies so that it forms a discussion thread. How does one model the notion of a thread? Does the "message" include it's children? Is the "thread" it's own...

Is it possible to implement X-HTTP-Method-Override in ASP.NET MVC?

I'm implementing a prototype of a RESTful API using ASP.NET MVC and apart from the odd bug here and there I've achieve all the requirements I set out at the start, apart from callers being able to use the X-HTTP-Method-Override custom header to override the HTTP method. What I'd like is that the following request... GET /someresource/1...

REST Service exposed on WCF not populating parameter values

I have a WCF service that takes as a parameter a string value "name". This service interface looks like this... [ServiceContract(Name = "ContactLookup", Namespace = "Search")] public interface IAjaxResultSearcherService { [OperationContract] [WebGet(RequestFormat = WebMessageFormat.Json)] Result[] SearchResultsWithNameLike(s...

Is there a RESTful way to configure routes for habtm?

In Rails you can use nested routes to create RESTful routes for has_one and has_many relationships. Examples can be found on the Rails Guides I'd like to ask if there is a good way to configure RESTful routes for habtm relationships? For example if I have a relationship A-habtm-B, my idea is to configure nested routes for A has_many B, ...

NHibernate and a REST Service Layer

If ADO.NET Data Services (Astoria) adds a REST layer on top of Microsoft's ADO.NET Entity Framework, is there an equivalent project that adds a REST layer on top of NHibernate? ...

ASP.NET MVC and Automatic RESTful Features

Does ASP.NET MVC have anything like the RESTful out-of-the-box features like Ruby on Rails 2.0? For example: cURL and Your Rails 2 App I think this is the built in REST access to your Models. Since models can be implemented in different ways in ASP.NET MVC is there a feature like this? ...

Looking for WPF/XAML example that gets XML from URL and displays in element

I can imagine WPF has a very easy way to grab XML from RESTful services and bind it into elements, e.g. GridView, perhaps even with 100% XAML. Does anyone have any example code showing this? ...