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|
...
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 ...
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">
<Approved>true</Approved>
<ApprovedCode>OK242C0010063439: X:</ApprovedCode>
<Validation...
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 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 ...
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 ...
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?
...
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...
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,...
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 ...
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...
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...
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...
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...
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?
...
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...
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...
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 ), ]
...
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...
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...