rest

Using Zend_Rest_Route with Zend_Navigation

I want to start using Zend_Rest_Controller for my app, and have set up the routing like so in my bootstrap: protected function _initRestfulRoutes() { $front = Zend_Controller_Front::getInstance(); $router = $front->getRouter(); // Specifying all controllers as RESTful: $restRoute = new Zend_Rest_Route($front); $rout...

Problem with Google AJAX Search API RESTful interface

When I send the following query http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q=coffee%20New%20York%20NY using c# WebClient.DownloadString function or ordinary web browser I get JSON data which is different from data for the same query using JavaScript and Google AJAX Search API. From REST service I get the followin...

How to upload binary (audio) data from a Flash AS3 client to .NET server (WCF/REST/HTTP/?)?

Simply stated: I'm trying to record audio in a browser, and get that data back up to the server. I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex). I think I've fig...

Modify headers in Pylons using Middleware

Hi all, I'm trying to modify a header using Middleware in Pylons to make my application RESTful, basically, if the user request "application/json" via GET that is what he get back. The question I have is, the variable headers is basically a long list. Looking something like this: [('Content-Type', 'text/html; charset=utf-8'), ('Pragma...

How do I construct a request for a WCF http post call?

I have a really simple service that I'm messing about with defined by: [OperationContract] [WebInvoke(UriTemplate = "Review/{val}", RequestFormat = WebMessageFormat.Xml, Method = "POST", BodyStyle=WebMessageBodyStyle.Bare)] void SubmitReview(string val, UserReview review); UserReview is, at the moment, a class with no properties. All...

Posting an image and textual based data to a wcf service

I have a requirement to write a web service that allows me to post an image to a server along with some additional information about that image. I'm completely new to developing web services (normally client side dev) so I'm a little stumped as to what I need to look into and try. How do you post binary data and plain text into a se...

Get HTTP Get parameters from Restlet Request

I am trying to figure out how to get the parameters from a Restlet request object. my request comes in as /customer?userId=1 and I want to grab the parameter to pass to my DAO for the query. public class CustomerResource extends ServerResource { @Get("xml") public Representation toXml() throws ResourceException, Exception { ...

Cascading Dropdown List

I am working on a web app and trying to code a form with two dropdown lists. The list in the second dropdown will be dependent on the selection from the first one. The task itself isn’t too complicated except that once the first selection is made, I need to make a database call to pull the data for the second dropdown. This is where I...

ASP.NET MVC 2 JSONP with MVC Futures

I´m using mvc futures 2 with WebApiEnabled for XML and JSON support. But due to cross domain issues with jQuery $.ajax I´m lookin in to JSONP. Is there a simple way to extend futures rest function for JSONP or should I do something else. Do anyone have some hints on this subject ? ...

CMS + Individual content segments + segmentation based on parameters + REST api

Hey, Does anyone know of a CMS system that allows business users to create content assets, parameters for segmentation purposes and then have the asset available to pull down via a REST api? The segmentation would be based off of time-of-day, location and various custom parameters. I would like to be able to make one API call (with pa...

How to properly use ActiveResource::CustomMethods when constructing URL?

Currently I am using Active Resource to consume a REST API. It works fine for simple things but for some reason will not respect custom methods. E.G. API::Model.find(m.id) #This works as expected API::Model.find(m.id).put(:foo) #This is equivalent to doing the above The Rails API http://api.rubyonrails.org/classes/ActiveResource/Cu...

Proper use of HttpRequestInterceptor and CredentialsProvider in doing preemptive authentication with HttpClient

I'm writing an application in Android that consumes some REST services I've created. These web services aren't issuing a standard Apache Basic challenge / response. Instead in the server-side code I'm wanting to interrogate the username and password from the HTTP(S) request and compare it against a database user to make sure they can run...

Authentication and authorization for RESTfull API (java jersery)

Hi, implementing service something similar with tinyurl or bit.ly, I'm would like to expose service as API, I'm using java and jersey as RESTfull service implementation. I'm looking for simplest way for authentification of users who use API, OAuth is first thing coming in mind, but the problem is I don't need this 3 iteration calls wit...

Rails: common approach for handling exceptions in restful actions on objects that have been destroyed?

It is very common in Rails for an objects_controller controller to have RESTful edit and destroy actions like so: def edit @object = Object.find(params[:id]) end def destroy @object = Object.find(params[:id]) @object.destroy redirect_to :back end With an associated view that provides edit and destroy links like so: <%= link...

How do I POST/GET from rails to API with Nestful?

Hi, this is a pretty basic question but I'm not entirely clear how to do this. I am trying to use a third-party service that has web-based service. The service is called Postful. But I'm not clear what exactly to do? I've looked at ActiveResource (http://api.rubyonrails.org/classes/ActiveResource/Base.html) and rest-client, but I'm s...

REST Authentication in PHP (CodeIgniter)

I writing REST API form my web application. Application is written using CodeIgniter framework. Application itself is working fine, but I'm stuck on making REST Authentication. I think that basic Http Authentication will be good enough for some time. Public API is not yet planned. Is there any code example how to achieve REST Authentica...

Creating a RESTful service in CakePHP

I'm attempting to create a RESTful service in CakePHP but I've hit a bit of a brick wall. I've enabled the default RESTful routing using Router::mapResources('users') and Router::parseExtensions(). This works well if I make a GET request, and returns some nicely formatted XML. So far so good. The problem is if I want to make a POST or ...

Java Jersey RESTful services

Rather new to REST and Jersey, and I'm trying out some basic examples. I've got one particular question though, which I haven't really found an answer for yet (don't really know how to look for this): how would you go about storing/defining common services so that they are stateful and accessible to all/some resources? For instance, a l...

Request/Response objects

I'm planning on using CXF's rest implementation. I'm thinking of simply annotating my entity classes with jaxb annotations, such as @XmlRootElement, in order to create response objects. The benefit being avoidance of code duplication. As for the (client) request object, which will be used by a separate web app, I'm thinking of 'copying' ...

Is there a .NET REST framework that meets these requirements?

We just started a greenfield project. A part of requirements is to provide application server Api as REST services. I found few ways to do it using OpenRasta, Windsor WcfFacility. From what I see on Web is not much information on this topic. I'm looking for a framework with support of: non intrusive api security interface versionning ...