rest

How can i visit urls with .html suffix

My rails version is 2.3.5(2.3+) How can I visit urls with .html suffix? Just like localhost:3000/welcome.html (welcome is a controller). I got routing errors when I visit urls above.But it works if the url with format param like this: localhost:3000/welcome?format=html In routes.rb: ActionController::Routing::Routes.draw do |map| ...

How do I make a request using HTTP basic authentication with PHP curl?

I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service. How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself? If so I've got some other questions - Is there a REST library for php? or is there a wrapper for curl that makes it a bit ...

Use VXML format for WCF REST Service Response (XML) Format?

Hi, I have created a REST web service using WCF and use HTTP Post Method. The request and response objects are all plain xml. Like the response object is: <Response xmlns="http://WebService/WCF" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt; <Approved>true</Approved> <ApprovedCode>OK242C0010063439: X:</ApprovedCode> <Validation...

Manage view state with multiple combined REST resources

Say for example I would write a forum which would look like this in the browser: - original post - Re: original post - Re^2: original post - Re^2: original post + Re: original post _______________________________________________________________________________ Text of the selected post. The tree view would be one resourc...

What should a developer know before building an API for a community based website?

What things should a developer designing and implementing an API for a community based website know before starting the heavy coding? There are a bunch of APIs out there like Twitter API, Facebook API, Flickr API, etc which are all good examples. But how would you build your own API? What technologies would you use? I think it's a good ...

I Don't Need a Facebook App, I just want their API (in Ruby)...

Can I use Facebooker without having to create a whole Facebook App in their Developer section? I don't need to create a Facebook App with Facebooker, I just want to be able to create events and posts on Facebook with my own custom admin panel on my site. Facebooker seems to have everything built already, so I wouldn't want to use just ...

RESTful view counter

I would like to count the access to a resource, but HTTP GET should not modify a resource. The counter should be displayed with the resource. A similar case would be to store the last access. What is the REST way to realize a view counter? ...

How should a REST URL schema look like for a tree hierarchy?

Let's assume that I have stores, shelves in a store, and products on a shelf. So in order to get a list of products on a shelf in a store, I'd use the following request: GET http://server/stores/123/shelves/456/products From here, how would I get an individual product? Should I use: GET http://server/products/789 Or: GET http://se...

nginx as a reverse proxy to limit http verb access

So I've got an app that uses CouchDB as the backend. Couch doesn't really have it's security/user model in place yet, and by default anyone can do anything (including deleting records and even the entire database). But, if we limit access to only GET requests we're much safer. I was hoping I could put nginx out front as a reverse proxy,...

Best way to do this RESTfully and right : Ruby on Rails

This is probably easy but I'm a bit of a newbie on wrapping my head around these things sometimes. Synopsis: I'm trying to make a checklist application that technicians go through and answer questions about what has been completed or done in the field. The technicians then submit this for review. The questions are created, managed, and ...

Upload image with Photoshop scripting

Is that possible to upload an image from Photoshop (for example, an open image exported to jpeg) to some web place - REST service, FTP etc by using scripting features of Photoshop? For example - I have an image open in Photoshop and then execute some special script that sends an exported version of it to some place over the web. I saw s...

RESTful cookie path fails in IE without trailing slash

I have been asked to build a tabbed section on pages that have RESTful URLs without a trailing slash (.NET MVC), for example http://myhost/books/the-amber-spyglass For the tabbed sections to be a bit more user friendly I want them to remember which tab was open on each page as the user moves around, so that if they return to a book the...

Android: What else can Facebook Connect do besides update your status? How can I perform other Facebook requests?

So I have successfully downloaded/compiled the ported Facebook Connect code for Android, created a Facebook app to connect to, and run the code on my emulator. It updates my status from my emulator, but I was under the impression I could perform other Facebook API calls. How would I go about making a friend request(knowing the user's Fa...

How do you return multipart content from a JAX-RS web service?

I'd like to avoid embedding HTML in XML returned from my JAX-RS web service, but still be able to return both XML and HTML in the response to a single GET. Is there a way to do this? Is it a bad idea? Right now I am doing 2 separate GET's for different resources one XML one HTML - however since both resources are always retrieved toget...

REST on GAE, what implementation to use?(RESTlet, jersey, other....)

Have somebody experience with using REST on GAE? Maybe you can advise some lightweight REST implementation for this. I found that RESTlet said that they have GAE optimised implementation. RESTlet-GAE Anybody try this? ...

why restful design means to differentiate create and update?

Hello everyone, I am doing a one-way data transfer app from MS Access to a Rails app. I keep the Rails app restful, so I tell my colleague that the Access app needs to keep track of whether or not a record is already sent over to the Rails app because the Access app will need the ID of that record in the Rails app to do "update". He doub...

dynamic content type

hi , i want to make a single wcf rest function which can return any content type (text-html / applicaiton-javascript and even gif . what should be the signature of the function ( the return type ) what should be the format of the service ?like [WebGet(ResponseFormat = WebMessageFormat.Json)] P.S: i cant make any new method due to the...

Bad request 400 on sending xml request in wcf rest

Hi all I am writing a sample application using wcf rest for authentication. Here is the snapshot of the code service Interface: [ServiceContract] public interface IAuthenticate { [OperationContract] [WebInvoke(BodyStyle=WebMessageBodyStyle.Bare, Method = "POST", UriTemplate = "/VUser",RequestFormat= WebMessageFormat.Xml ), ] ...

Can I 'bounce' a file upload posted to one server directly to another?

I've got a Java REST based web service sitting on a server which is accessed via a PHP web application on a separate server. The PHP app delegates the actions performed by browser clients to the web service. I want to perform a file upload function to the web service via HTTP POST and PUT. The browser clients will use POST to upload a f...

How to consume WCF on windows server 2000 OS?

Windows server 2000 does not support .NEt 3.5, so its not supporting WCF? We, lazy, did not consider this before creating WCF application (Server, client, listener etc). My Client Console application is compiled in 3.5 just to consume WCF. I can recompile Client app to framework 2.0. to able to run it on Windows Server 2000. But how i am...