rest

RESTful way to use form_for?

I am attempting to use form_for to implement a search form that works with a table-less Search model I created. The search form keeps triggering the 'index' action. I assume I should use 'new' to create the form and 'create' the process the search query. Looking at the log, my POST is getting changed into a GET. Here's my code: /searche...

asp.net mvc as a restful service and an application?

Hi all, Currently I am working on small application in asp.net mvc. It is a some kind of localization tool. Our clients login on our application and they can translate terms that shows up in our applications that they use. It is happens like this: login to localization site find and translate certain terms for example title for button...

How can I send date object from Adobe Flex to RESTful rails?

Hello, I'm working on an Adobe AIR project that use the Ruby on Rails as RESTful web service as the back end. I have found a lot of examples that show how can I send the data to operated by Rails. but I stuck at date object, which will be very useful if I can send Actionscript's date object to Rails via XML or whatever and Rails can und...

Apache rewrite rules redux

I've got a REST framework that when plopped into any directory should Just Work(TM), and it seems to work fine when I've got projects in subdirectories, but not if it's in root. So, given a few example directories; / /project1 /bingo/project2 /hoopla/doopla/minor/project3 All of these works fine, except I'm getting "funnies"* when the...

Should a RESTful 'PUT' operation return something....

I was wondering what peoples opinions are of a RESTful 'PUT' operation that returns nothing(null) in the response body? ...

REST Url for Lists

Let's say I have a method that returns a list of customers and as input has a list of states and list of sizes, something like return customers where state in (NY, CA, TX) and size in (Small, Medium) What would the best RESTFul URL that I should use? The problem that it is a query and does not point to a specific 'resource'. Here are ...

What are some good resources for developing RESTful Web Service Schemas?

So, I'm looking at building a brand new REST WS API for my application. I've done my homework on the technical side and feel fairly confident about setting up paths/to/resources.andTheirRepresentations. However, does any one have any suggestions on good resources for processes to develop what those paths should be? What methods should be...

How to do a get and post in php with restful web service server side

Hi can anyone past some code how to do a restful web service get and post method. This would be server side so I would be able to invoke the two services from a client. Thanks! ...

Keeping Tables Synced Across Rails Apps Without SQL replication?

I have a rails app that uses two of the same models as another rails app I have. What's the best way to keep data synced between two models? MySQL replication probably won't be possible due to hosting restrictions and since stuff that references the replicated data is dependent => :destroy meaning mysql replication will cause stuff tha...

Load testing tool that can send PUT/DELETE methods

Hi, I am finding load testing tool that can send PUT/DELETE requests. Neither ApacheBench nor JMeter supports these methods. After several hours' googling, I found www.soapui.org that looks good. Do you have any other recommendation? Command line tool like ApacheBench will be better for me. Thanks ...

"Refreshing" an XML feed on iPhone/Mac OSX

Hi all, I'm curious for those of you who are building iPhone apps based on REST/SOAP/XML-RPC or simply pulling down a dynamic XML feed, what does it mean exactly to you when a user says 'refresh' the feed? The straight forward way is to populate some collection, say an NSMutableArray, with whatever you bring down from the feed. If a wi...

How to consume XML from RESTful web services using Django / Python?

Should I use PyXML or what's in the standard library? ...

Erlang vs The Real/Outside world, how to comunicate?

Hello, I'm learning erlang and I'm very fascinated by the mnesia db. I want to build some real world application in C# / F# using erlang as backend. I'm searching for a good solution to communicate with erlang nodes from the outside world. What I found so far: (A) OTP.net, an opensource .net library implementing the 'native' erlang c...

How to design different 'views' of a model RESTfully?

By 'view' here I mean different combinations of properties of the model, not the view of the traditional MVC. For example, I have the following model: class Game < ActiveRecord::Base has_many :players belongs_to :status has_one :deck has_many :turns has_one :current_turn, :class_name => 'Turn', :conditions => ['turn_num = ?', ...

before_filter and respond_to formats

In a controller in my Rails app, I can do this: before_filter :login_required, :except => :index But I would like to apply the filter not only based on the action name but on the format of the request. In other words, I would like to do something like this: before_filter :login_required, :except => {:action => :index, :format => :js}...

What are the best practices for consuming REST based WCF services from PHP?

We have a website built in PHP and are trying to enable it to talk to couple of services that are going to be written in WCF and follow REST Style architecture for web services. Anybody have any best practices? issues? ...

ActiveMQ 5.2.0 + REST + HTTP POST = java.lang.OutOfMemoryError

First off, I am a newbie when it comes to JMS & ActiveMQ. I have been looking into a messaging solution to serve as middleware for a message producer that will insert XML messages into a queue via HTTP POST. The producer is an existing system written in C++ that cannot be modified (so Java and the C++ API are out). Using the "demo" ex...

How do you do an HTTP Put?

I feel like an idiot asking this. In fact, after typing the title, StackOverflow barks at me, "That's not a very good title. Can you add some more unique words to it?" No I can't, SO; sorry. Here we go: We have this software that has a webservices component. Now, the administrator of this system has come to me, wanting to import data i...

How to post JSON to PHP with curl

I may be way off base, but I've been trying all afternoon to run the curl post command in this recess PHP framework tutorial. What I don't understand is how is PHP supposed to interpret my POST, it always comes up as an empty array. curl -i -X POST -d '{"screencast":{"subject":"tools"}}' \ http://localhost:3570/index.php/traini...

How would you develop and deploy a simple web service?

I am looking for any insight/direction on designing a simple web service. I would love to hear some thoughts on how to quickly get started, and what pitfalls to avoid. To simplify, here are the basics I'm looking to accomplish: Service should provide a simple database query and multi-value response. Service should provide a simple mult...