I am working on building an REST API in PHP, I need to know if it's possible to to POST an array of methods/functions and params to my api script and have my code run the listed functions and print to the screen an array that the functions produced, example if a user sent a request to get a list of 5 photo url's it would post a PHP array...
I have a simple WS that is a @PUT and takes in an object
@Path("test")
public class Test {
@PUT
@Path("{nid}"}
@Consumes("application/xml")
@Produces({"application/xml", "application/json"})
public WolResponse callWol(@PathParam("nid") WolRequest nid) {
WolResponse response = new WolResponse();
respo...
I'm building a little user management tool which should be used with a web GUI (probably made with Wicket). Some of the services this tool provides should be REST-ful and now I wonder if REST should be the only external interface (having CouchDB with its REST interface in mind). The GUI part of the application would then make REST calls ...
Hi,
I need to implement a Java REST Web Service (we use Jersey framework) which can basically either
a. block waiting for some event (or poll for the event), before returning the response
b. provide some kind of aysnc behaviour to notify the client when the request has been processed.
I was thinking of returning a transationID, and ha...
I am (as a follow-up to this question) looking for a way to wrap APIs around default functions in my PHP-based web applications, databases and CMSs.
I have looked around and found several "skeleton" frameworks. In addition to the answers in my question, there is Tonic, a REST framework I like because it is very lightweight.
I like RES...
Being curious, I wonder why HTTP, by design, can only handle one pending request per socket.
I understand that this limitation is because there is no 'Id' to associate a request to its response, so the only way to match a response with its request is to send the response on the same socket that sent the request. There would be no way to...
I am using piston and I would like to spit out a custom format for my response.
My model is something like this:
class Car(db.Model):
name = models.CharField(max_length=256)
color = models.CharField(max_length=256)
Now when I issue a GET request to something like /api/cars/1/ I want to get a response like this:
{'name' : 'BMW'...
Anyone have a recommendation for a REST client wrapper for .NET similar to ActiveResource?
...
I'm developing a new experimental web-application framework, and I decided to give RESTful some attention. I've read up on the basics, and feel like I have a pretty good understanding of RESTful as a concept.
I've got a system up and running, using URLs strictly to define 'nouns' in the system and take the 'verbs' from the HTTP request ...
I want to make Restful - Web Service using netbean 6.5, glassfish V 2 , and i already make table and the relationship between table. But when i want to test restful Webservice, some table it show
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling t...
I writing here to clear my and may be many people 's misconceptions about them...
first my question is:
SOAP is xml based protocol
REST is web based architectural web service
JSON is standard but not xml based
how can we compare them???? as trio are different things
2nd question is:
is REST response xml based only or json based a...
I'm building a very simple REST API using Jersey, and I've got a warning in my log files that I'm not sure about.
WARNING: A servlet POST request, to
the URI
http://myserver/mycontext/myapi/users/12345?action=delete,
contains form parameters in the
request body but the request body has
been consumed by the servlet or a
se...
I have a Bill model with nested Customer model.
The Customer model has a phone number with a uniqueness validation on it.
While creating the bill I want to fetch the existing record based on the phone number or create a new one if such doesn't exist.
How should I do it in a RESTful way?
...
Let's say I have a calendar on my page and clicking on a day would mark that day as complete.
But I want to use POST and not GET, since GET is not suitable for this kind of stuff (changing something). And I also don't want to use JavaScript.
What I'm going for here is to build a page that will work without JavaScript (which I will use t...
Hi guys,
we are having a search/list-resource:
http://xxxx/users/?page=1
Internally the page-size is static and returns 20 items. The user can move forward by increasing the page number. But to be more flexible we are now thinking also to expose the size of a page:
http://xxxx/users/?page=1&size=20
As such this is flexible ...
I have been banging my head of the wall for two days with this so, hopefully, someone can give me a hand. What I have is a RESTful Web Service that I wrote using WCF; nothing to it really just two methods that accept a single string parameter and also return a string. Both the parameter and return value are straight XML.
[ServiceContra...
Hey folks, this seems to have been discussion fairly often but I want to make a simple, watered down question around doing authentication with RESTful services. The scenario is as follows:
There is a system that houses registered users for an application. The system exposes a RESTful API for accessing these users.
There is a fro...
I have an APP that calls Facebook status.get method via the REST server - restserver.php using session key method. This app works fine for most of the users, but for one user I consistently receive HTTP 500 status code. Since this doesn't have any specific Facebook error message, it is almost impossible for me to debug this.
Anyone face...
When using the REST interface for Last.fm web service, are the "Etag" and/or "Last-Modified" HTTP headers provided in the responses?
E.g. let's say I plan on using the track.getTags API method, is either "Etag" / "Last-Modified" HTTP header sent along with the response?
(NOTE: I have asked the same question on Last.fm's "discussion boa...
Is Cross-Site Request Forgery possible against a stateless RESTful service?
I'm not talking about pseudo-REST where the server remembers that you're logged in via a cookie. I'm talking about pure no-application-state-on-the-server REST with no cookies.
I'm using SSL and Basic Authentication. For every request, that Authorization head...