I see a lot of examples for Jersey that look something like this:
public class ItemResource {
@GET
@Path("/items")
@Produces({"text/xml", "application/json"})
public List<Item> getItems() {
List<Item> items = new ArrayList<Item>();
Item item = new Item();
item.setItemName("My Item Name!");
...
If there's a better place to ask this, please let me know.
Every time I build a new website/blog/shopping-cart/etc., I keep trying to do the following:
Extract out common functionality into reusable code (Rubygems and jQuery plugins mostly)
If possible, convert that gem into a small service so I never have to deal with a database ...
Let's say I have the URI for a RESTful or other contract-less API. Is it possible to determine its interface programatically? I'm using C#/ASP.net MVC, not sure if that's important.
I understand that there won't be a published contract, but I'm wondering if there's something I'm not thinking of (there usually is).
...
I'm almost afraid to post this question, there has to be an obvious answer I've overlooked, but here I go:
Context: I am creating a blog for educational purposes (want to learn python and web.py). I've decided that my blog have posts, so I've created a Post class. I've also decided that posts can be created, read, updated, or deleted (s...
My only real exposure to the ideas of REST has been through Ruby on Rails' RESTful routing. This has suited me well for the kind of CRUD-based applications I have built with Rails, but consequently my understanding of RESTfulness is somewhat limited.
Let's say we have a finite collection of Items, each of which has a unique ID, and a...
I'm having an issue accessing raw request information from PHP when accessing a script using the HTTP DELETE directive. I'm using a JS front end which is accessing a script using Ajax. This script is actually part of a RESTful API which I am developing.
The endpoint in this example is:
http://api.site.com/session
This endpoint is used...
After deploying a WCF RESTful service that i created using the REST started kit, i got several errors that i managed to solve following this post:
http://www.edoverip.com/edoverip/index.php/2009/01/30/running-wcf-on-godaddy
Now i'm stuck with this error:
IIS specified authentication schemes 'Basic, Anonymous', but the binding only supp...
If I have a REST based service written in the Symfony [symfony-project.org] framework (i.e. PHP), is there any decent tools/frameworks out there that will parse my code and generate API documentation?
The Java based framework enunciate has documentation capabilities similar to what I need, you can view an example of this here: http://en...
Here's my set of requirements: I'm looking for an RPC framework such as thrift, avro, protobuf (when adding services to it) which supports:
Easy and intuitive IDL. No serial numbers, no manual versioning, simple... avro is a good example for this.
Works with Java and Python
Supports both fast binary prorocol, as well as HTTP based re...
So I am using Limonade PHP which has a RESTful design which emulates PUT, POST, DELETE routes for create, update, delete.
I am trying to develop some form validation which is going well. The major problem I am facing though is how to return my filtered data (which has failed validation) back to repopulate the create or edit form.
How w...
the cakephp rest tutorial says that post data should be in $this->data, but I am finding that it is not, but instead inside $this->params['form']
However, when using cakephp form helper in a view, the data is in $this->data.
Am I correct to have to check both locations in my controller?
It just seems a bit of a waste of extra code. S...
I am in a process of designing a client for a REST-ful web-service.
What is the best way to go about representing the remote resource locally in my django application?
For example if the API exposes resources such as:
List of Cars
Car Detail
Car Search
Dealership summary
So far I have thought of two different approaches to take:
...
I have several RESTful endpoints like such:
System.Security.Role.svc
System.Security.User.svc
etc.
This is meant to be a namespace so our RESTful URL's would look like:
/rest/{class namespace}/{actions}
I have tried a few examples to get the SVC extension removed when my endpoint has multiple periods in it, however, nothing seems t...
Hi,
I've read several posts in the internet about that Silverlight only supports GET and POST, and that the most of the web browsers too. Is this true? has it changed lately? I'm developing a RESTful web service for a Silverlight application, still in early stage, and I'd like to know if I should use just POST and GET, or otherwise I co...
Hi, SO!
I'm currently trying to figure out which implementation of JSR-311 I'm going to recommend further up the food chain. I've pretty much narrowed it down to two options - Spring 3.0 with it's native support for REST - or use Sun's own Jersey (Restlets might also be an option).
To me it doesn't seem to be much of a difference in th...
I have a RESTful WCF 3.5 endpoint as such:
System.Security.User.svc
This is supposed to represent the namespace of the User class and is desired behavior by our client.
I have another endpoint I created for testing called:
Echo.svc
I am writing an overridden IHttpModule and in my module, I follow what almost everyone does by doing...
I am having a problem with my current RESTful api design.
What I have is a REST api which is consumed by Django web-server, which renders the HTML templates.
REST api
> Django webserver
> HTML
The problem I am encountering is that I have to reconstruct all the URLS like
mysite.com/main/cities/<id>/stree...
Hi I have a JSON string that looks like this (Usingt Rails and a REST service)
{
person:
{
name:"Pepe",
last:"Smith"
hats:[ { team:"lakers", color:"purple"}, { team:"heats", color:"red" }] } }
I want to be able to able to get that JSON, and save the Person to the database, but I want to s...
I am currentlly trying to design a RESTful MembershipsController. The controller action update is used only for promoting, banning, approving,... members. To invoke the update action the URL must contain a Parameter called type with the appropriate value.
I am not too sure if that is really RESTful design. Should I rather introduce sepe...
Hi all !
I want to add REST to my tapestry project, and so need to know how to implement it.
What is the better way ?
thx.
[Edit, copied from answer:] I have to add GET, PUT, POST and DELETE services to my tapestry application. I see that Tapestry has RESTful url but what about JAX-RS and annotations?
...