similar to: REST default response format

Displaying 20 results from an estimated 90000 matches similar to: "REST default response format"

2007 Mar 28
7
Rails, REST and JSON
Hi everyone, I''m writing a lightweight AJAX application using Rails on the server side as a RESTful web service provider. I need the web service to support both JSON and XML I/O. Outputting data in XML and JSON is easy (using to_xml and to_json), and it''s also easy to do XML input as Rails does it for you automatically. Is it possible to somehow have the same automatic parsing
2008 Apr 30
1
Google Ajax Search API - UTF-8 encoded response
Hello All, I am writing a facebook application in ruby on rails, which requires google search in one page. I''ve implemented this using a simple RESTful interface as follows: url = URI.parse( "http://ajax.googleapis.com/ajax/services/search/ local?v=1.0&q="+params[:keyword] ) req = Net::HTTP::Get.new(url.path+"?"+url.query) res = Net::HTTP.start(url.host,
2007 Dec 06
2
Implementation of rest in ROR
Hi all, I am new to ROR world. I know the REST conceptually but find the difficulties in implementation can anybody guide me that which is the best book which i have to read. also some good links of implementation of rest in ROR. If anybody made a small application to restful in rails please forward me that application. i found some demo but i didn''t understand for what purpose they
2010 May 30
0
Http Rest call and JSON response
I am trying to call remote server rest api , the response type of call is json data. plz give me tips how to do this . I am new in rails . -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2013 Apr 15
4
Rails' scaffold controller generator - should it test json format also?
(Forgive me if this is incorrect, because I recognized this initially as something in Rails 4.0.0.beta1 and have just done a cursory look over the latest generator code.) Noticed in Rails 4 that the test generated for a scaffold controller only tests the html format instead of both html and json:
2006 Oct 16
0
Restful routes, not repeating yourself and non-standard rest actions best practices
So I''ve recently started playing with the restful routes support in edge rails, converting a few of my controllers to support all the standard operations.. One thing that''s been bothering me, however, is the following: Before using restul routes, I would define an edit method in my controller which would be responsible for both creating new objects as well as editing
2007 Jun 19
0
Rails + Rest
I found myself blocked trying to think of Restful ways of doing things, until I subscribed to the peepcode screencast. Even so, I prefer using regular controllers in the initial stages when evolution of model relationships is not clear in the project. Is this the right way to do things ? I noticed the edge version now uses Restful design by default (in scaffolds, etc). This may turn early
2007 Oct 18
0
REST help
Hi all, I am trying to build a RESTful shopping cart and I have hit a small wall, but before I get to that let me explain what I have done thus far. I have two RESTful controllers, CartController and CartItemsController with a nested routes setup like so map.resources :carts do |carts| carts.resources :cart_items, :collection => {:empty => :delete} end (I added a custom route to
2008 Dec 02
2
ActiveResource - xml and json format return different results
Hi, I''m using Rails 2.1.2. and I wanted to switch ActiveResource format to JSON and thought that it will work smoothly, but unfortunately it wasn''t the case. XML and JSON formats generate different objects: XML version #<User:0xb7658440 @prefix_options={}, @attributes={"created_at"=>Mon Nov 28 11...}> JSON version #<User:0xb746af5c @prefix_options={},
2015 Jun 30
4
[LLVMdev] Proposal: REST and Ajax in LNT
I think it would be super useful to give LNT a RESTful interface. As LNT grows, it would be nice to be able to update some of the pages with Ajax(or json). Especially for pages with long load times, it makes sense to be able to speed up load times, by fetching the data after page load. It would also allow us to build more dynamic pages, and allow non-web clients better structured access to LNT
2008 Sep 08
0
Best way to send JSON request/get a response from controller?
Hello Friends, What is the best way to send json from your controller, and await for a response? Ajax? Ruby''s net/http? The JSON server that I am sending the request to only accept POST methods, and sends a POST back. If I use Ajax, is it possible to get the POST response? Is there a scriptaculous or YUI function that handles this well? Thank you for your help - Jin
2006 Sep 14
4
AWDWR 2nd edition and REST
Question, and I''ll preface it by asking if this is the right list to be posting questions regarding anything past Rails 1.1.6 , (i.e. edgerails) ? In the latest revision of AWDWR there is a sample REST based app. During the creation of the controller and actions, there is a foot note that says: "7. By the time you''re reading this, there may well be support build into Rails
2009 May 28
0
Re: ActiveResource as API test rig? Two jsons?
bump... On Wed, May 20, 2009 at 3:57 PM, Marc Byrd <dr.marc.byrd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hi, > > I''m using ActiveResource as an API test rig for an API we''re developing for > our PHP app - the goal being to validate that we''re following some > externally validated conventions for ReSTful API and that we can support at >
2009 Jan 11
2
Got an error on returning data as json format when the data is nil
Hi there, One of my app''s actions returns data as a json format. If the data exists, everything works perfect. But if the data is nil, I get the following error. -------------------------------- ActionView::MissingTemplate (Missing template user/show.erb in view path /var/www/my_app/releases/20090110234348/app/views:):
2008 Jul 29
0
appending to a restful resource a custom format
Hi everyone, I would like to add the format and a custom field to all my restful resources, without touching my application (I don''t want to change all url_path to format_url_path to make things clear). For being more specific I want to add :format.:lang to my restful resources, so i can have /posts/1.html.en that map to the english page and /posts/1.html.it that map to the italian one.
2008 Aug 10
1
Prototype, JSON and headers
Hi everyone. I love JSON and using Prototype has help me reduce the code to handle AJAX responses. But one thing keeps me confused and sometimes even frustrated. I don''t really understand what is going on with the headers, so if someone could take some time to explain what is going on, I (and probably a lot more people) would be very thankful. The thing is this. On my local server (Mac OS
2008 Jan 04
0
REST: Handling homepage and pagination for XML
Hi you all, I have two questions regarding a REST app and the XML responses: - Homepage: I want to have a kind of homepage to list all the list of resources the user can access to. I''ve read I can do it with just an index.html. However, my app also offers the response in XML so, what if the client want the XML? Can I have an index.rxml too? In [1], they offer the possibility to have a
2007 Dec 07
1
format.json
Hi did anyone used format.json before.. If so pls, do let me know how to use it.... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2007 Jun 13
2
AJAX dealing with Sortable table?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">I''m designing a table that is displayed in a client browser.<br>
2008 Sep 25
2
jquery, format.js and IE
I''m trying to use jQuery to write all my js unobtrusively, and running into a bit of a problem when triggering the format.js block in IE6 (and possibly IE7). It returns the JSON string no problem, but instead of parsing it, IE6 asks to download the resource as a .js file. So if my url is ''/pictures/1.js'', IE6 will ask to save or run ''1.js'' I did do