I'm trying to nest a form within another using submit_to_remote but it does a PUT instead of a POST. Can anyone explain what's wrong here?
The routes are RESTful:
map.resources :thing
map.resources :item
The view is like this:
<% form_for(@thing) do |f| %>
<% fields_for(Item.new) do |i| %>
<%= i.text_field :name %>
<%= sub...
Hi all,
Since Spring 3 was released in December last year, I have been trying out the new REST features in the MVC framework for a small commercial project involving implementing a few RESTful Web Services which consume XML and return XML views using JiBX. I plan to use either Hibernate or JDBC Templates for the data persistence.
As a ...
I'm trying to get an XML document from a REST service using the Jquery get method, but it doesn't seem to be able to download. After only about 11 seconds, the connection dies and I receive a blank document. I've tested out the URL by accessing it through the browser, and it works (even though it takes 4 minutes to load).
$(document).re...
I am designing RESTful Api's and would like some advice on designing an API where the caller wants to query records based on more than one search parameter.
I have only seen restful apis that use one parameter.
how should i do this?
e.g. if i have created a restful api for a list of contacts, how would I format a call that returned al...
Does anyone know if (and how) I can build an application (Java/Ruby/whatever) doing REST or RPC calls to a social network like Orkut (using opensocial) to search for a user by name or email address? So far I know that I can list all friends for a particular user ID, but I want to search among all users. Would I need to code it as an app/...
Hello,
So I am trying to use YQL to access the flickr api but I have been having some issues. From reading the YQL info, it seemed like I could use any flickr query in YQL but for some reason I cannot use flickr.people.getPublicPhotos call to access all pictures from a certain person. When I try any such query it isn't recognized. Is th...
I am working with a large website written in Ruby on Rails. Thanks to the support for REST in Rails 2, the site's business logic is all accessible via a consistent XML API. Now I want to be able to easily write one or more JavaScript frontends to the site that interact with the generated Rails XML API.
Ideally, an automated wrapper for ...
I guess this question will sound familiar, but I am yet another programmer baffled by REST.
I have a traditional web application which goes from StateA to StateB and so on
If the user goes to (url of) StateB, I want to make sure that he has visited StateA before.
Traditionally, I'd do this using session state.
Since session state is no...
I'm trying to create a REST based web service with data encapsulated using JSON. My problem is when I pass the string version of JSON in the URI it turns to something like this: %7B%22coal%22:100,%22ele%22:1500.1%7D.
I'm wondering if there are any functions Java for converting between the escaped and unescaped versions so I can parse th...
In the OpenSocial Data specificaiton 1.0 for a Person object (social profile data) it includes the use of a generic called Plural-Field.
The spec can be found at:
http://opensocial-resources.googlecode.com/svn/spec/1.0/Social-Data.xml#Person
In the 1.0 data specification there is no XSD and no examples showing the use of this generic P...
I want to use asymmetric encryption of headers in RESTful requests to verify the identity of the system sending the request: i e System A encrypts it's name, timestamp, and the service name using it's public key in a request to System B. System B then uses the public key of System A to decrypt, proving the authenticity of the request.
1...
I have a Rails based server running several REST services and a Rails based web UI that interacts with the server using ActiveResource. Same server is being used by other clients( e.g: mobile). I have to generate documentation for the REST interface. I need to provide service URL, input/output and error document structure for each servic...
Consensus is you shouldn't nest resources deeper than 1 level. So if I have 3 models like this
(below is just a hypothetical situation)
User has_many Houses has_many Tenants
and to abide by the above i do
map.resources :users, :has_many => :houses
map.resorces :houses, :has_many => :tenants
Now I want the user to be able edit both ...
I've been Googling my brains out trying see if there's a simple way to bridge content to and from WordPress to and from TeamSite. I'm coming at this from the perspective of a WordPress developer.
I see in the book "The Definitive Guide to Interwoven TeamSite" (http://bit.ly/d3z4wI) mention of objects for the Interwoven LiveSite product:...
I'm having two models: Snippet and SnippetComment. These also have their own controllers, as well as views. In /app/views/snippets/show.html.erb I have a form that starts like this:
<% form_for(@new_snippet_comment) do |form| %>
SnippetComment belongs to one Snippet, and a Snippet belongs to one User. This means that I have this routi...
All the examples I've seen regarding a RESTful architecture have dealt with a single record. For example, a GET request to mydomain.com/foo/53 to get foo 53 or a POST to mydomain.com/foo to create a new Foo.
But what about multiple records? Being able to request a series of Foos by id or post an array of new Foos generally would be mo...
Hello,
So I simply want to add my current facebook status to my personal website. I have been looking at tutorials and other posts about fb and fb connect, but I am still confused.
Is there anyway to do this with simple REST calls? Like twitter or flickr?
From what I understand I dont need FB connect because I am just getting my own ...
Let's say that I'm uploading a large file via a POST HTTP request.
Let's also say that I have another parameter (other than the file) that names the resource which the file is updating.
The resource cannot be not part of the URL the way you can do it with REST (e.g. foo.com/bar/123). Let's say this is due to a combination of technical...
Maybe my logic is not restful or know if this is how you would do it but this is what I am trying to do.
I'm getting a category inside a category controller and then once I get that category I want to return to an index page in a different controller but keep that @category and the Category.busineses.
Before rest I would have just done...
I have a REST based webservice that was originally deployed to WebSphere and errors were being returned properly as we expected (HTTP Status code plus a text message in the response body of the details of the error). But once deployed to JBoss, those text error messages became wrapped in HTML by JBoss, I'm assuming because we don't have ...