I want to write an extremely lightweight PHP server which handles data requests from remote clients. The data returned is tabular (like that of data read from a CSV file or a database table). The "problem" is that I could be returning potentially several hundred thousand rows of data - with a column width of between 10 - 15 (depending on...
The Microsoft AJAX Library Preview 6 and jQuery provide several ways to make the sorts of calls I need:
Sys.Net.WebRequest (ASP.NET Ajax)
Sys.Net.WebServiceProxy (ASP.NET Ajax)
$.ajax (jQuery)
Sys.Net.WebRequest offers a way to specify the verb ("GET", "POST", "PUT", and "DELETE"), but no built-in callback for a failed request (they ...
Which one of these Uris would be more 'fit' for receiving POSTS (adding product(s))? Are there any best practices available or is it just personal preference?
/product/ (singular) or
/products/ (plural)
Currently we use /products/?query=blah for searching and /product/{productId}/ for GETs PUTs & DELETEs of a single product.
...
Hi,
I'm using the Spring 3.0 RC1 framework and I'm currently testing out Spring mvc. I wanted to use Spring mvc to handle restful requests. I have set up my controller to handle the URI request. I am passing in xml with the request. So on the controller I have a method like follows:
public void request(RequestObject request) {
d...
For a website I am working on defining a RESTful API. I believe I got it (mostly) correct using proper resource URIs and proper use of GET/POST/UPDATE/DELETE.
However there is one point where I can't quite figure out what the proper way to do it "in" REST would be - comparison of lists.
Let's say I have a bookstore and a customer can h...
Hi there,
i am using the Plain old XML template from WCF REST Starter Kit Preview 2 to build a REST service and i would like to set the ResponseFormat inside the OperationContract, not outside(not with ResponseFormat = WebMessageFormat.Json) because i want to set it accordingly to the Accept Header in the Request. and ideally i would lik...
I just implemented sign in with twitter for my webapp. At the end of the OAuth 3-legged flow, I needed to retrieve the screenname & avatar pic for the user. All I had was the twitterid e.g. 3546735
So I performed a GET http://twitter.com/users/show/3546735.json
No security is required for this method, although it is rate-limited.
Recen...
Hi,
I'm currently returning a stream from all my WebGet/WebInvoke decorated methods from WCF. And I also get a stream as input. I do this because I want flexibility with response & input content types. This is primarily because I need flexibility when parsing the input - it cannot be easily serialized / deserialized.
However I then use...
Consider following scenario:
I have RESTful URL /articles that returns list of articles
user provide his credentials using Authorization HTTP header on each request
articles may vary from user to user based on his privileges
Its possible to use caching proxy, like Squid, for this scenario?
Proxy will see only URL /articles so it may ...
Hi,
I am working on a REST based interface where people get a json file. The client needs to access the file from another Domain. I use jsonp which works so far. My problem is the rendering in Grails. At the moment I use the 'as JSON' to marshalling the object:
render "${params.jsoncallback}(${user as JSON})"
The Json file getting to...
Have you run into this problem? I run code remarkably similar to that from a this previous question, When in nUnitTest mode and the URI includes "/?test&format=xml" the nUnit test fails with and IOException, "Unable to read data from the transport connection: The connection is closed."
However the Fiddler trace that was running at the t...
Setting up a WCF service that uses the webHttpBinding... I can return complex types from the method as XML ok. How do I take in a complex type as a parameter?
[ServiceContract(Name = "TestService", Namespace = "http://www.test.com/2009/11")]
public interface ITestService
{
[OperationContract]
[WebInvoke(Method = "POST",
...
Which REST API do you prefer - Jersey or Restlet? This would encompass both the client and server API-s.
We really need to just pick one and kick the tires around but I was curious what the community thinks.
Restlet seems simpler and better documented to me. I've had a hard time even finding decent documentation about the Jersey clie...
We want to implement web services on our Weblogic 8.1 Java 1.4 application. We want to create new server services and call services in other apps. And we need to stick with Java 1.4 (for now).
Due to 1.4 we can't use frameworks like Restlet or Jersey. Are there any good web service (preferably REST) API frameworks that support Java 1...
What's the best way to represent a list resource when the list can be "owned" by different resources?
Take your typical blog example.
Say you've got Posts, Comments and Users. A Post has many Comments and a User is the author of many Comments.
You may want to get a list of Comments within the context of a given User (e.g. that User's...
We are re-developing our buyonline functionality and we are doing it the RESTful way.
The process is a three step one and the customer is asked to enter data at each step.
Let's say the three URL's are;
/step1.aspx
/step2.aspx
/step3.aspx
Each step is pretty autonomous and don't require data from any of the other steps.
The questi...
I have a datacontract as defined below:
[DataContract(Namespace="",Name="community")]
public class Community {
[DataMember(Name="id")]
public int Id{get; set;}
[DataMember(Name="name")]
public string Name { get; set; }
[DataMember(Name="description")]
public string Description { get; set; }
}
and the service...
Hey guys,
I have written a pretty extensive REST API using Java Jersey (and JAXB). I have also written the documentation using a Wiki, but its been a totally manual process, which is very error-prone, especially when we need to make modifications, people tend to forget to update the wiki.
From looking around, most other REST API's are ...
Hi everyone,
How can I write this output to the stream ? I want to write element to the stream as text/xml format. I am just trying to create simple REST service. I want to use element.Save method.
<%@ WebHandler Language="C#" Class="Calculation" %>
using System;
using System.Web;
public class Calculation : IHttpHandler {
public...
Hi all,
I have a requirement to access the HttpContext.Current from with-in a RESTful WCF service. I know I am able to achieve this by adding the following to config:
<serviceHostingEnvironment aspNetCompatibilityEnabled=”true” />
and using the following attribute on my service:
[AspNetCompatibilityRequirements(RequirementsMode
...