rest

REST - get a random number GET or POST?

How should a random number generator properly be implemented in REST? GET RANDOM/ or.. POST RANDOM/ The server returns a different random number each time. I can see arguments for both ways. ...

Talking to an Authentication Server

I'm building my startup and I'm thinking ahead for shared use of services. So far I want to allow people who have a user account on one app to be able to use the same user account on another app. This means I will have to build an authentication server. I would like some opinions on how to allow an app to talk to the authentication ser...

How to do REST calls from Google Chrome

Are there any plugins for Google Chrome to make REST calls? Like the Poster plugin for firefox. I have tried chrome-poster, but it seems it still is on early development ...

Attaching files to WCF REST service responses

I have a resource that looks something like this: /users/{id}/summary?format={format} When format is "xml" or "json" I respond with a user summary object that gets automagically encoded by WCF - fine so far. But when format equals "pdf", I want my response to consist of a trivial HTTP response body and a PDF file attachment. How is ...

ASP.NET MVC 2 Controller parameter value getting truncated from what is posted

I have an ASP.NET MVC 2 application (.NET 4) that takes an HTTP post with two parameters. The second parameter is a big chunk of html. The controller action is shown below. [ValidateInput(false)] [AcceptVerbs(HttpVerbs.Post)] public ActionResult TriangleUpdate(string userId, string html) { var user = _udRep.GetU...

Rails method as a nested resource

Hello, I'm wondering about the clever way to do this... I have methods that return a value when passed an an object as parameter, such as: <%= average_rainfall(@location) %> I'd like to use the exact same methods as a nested resource to call via jQuery/Ajax, like so: .load('/location/8/average_rainfall') I understand how to define t...

How can I use a RESTful JSONResult from my controller to populate Bing Maps Geocoding?

I know there are a few topics on this, but I seem to be fumbling my way through with no results. I'm trying to use a controller to return JSON results to my Bing Maps functions. Here's what I have for my controller (yes it is properly returning JSON data. Function Regions() As JsonResult Dim rj As New List(Of RtnJson)() rj.Add...

Restful services VS Restless services

What is the difference between restful services and webservices ? ...

RESTful services architecture question

This is question more about service architecture strategy, we are building big web system based on rest services on back end. And we are currently trying to build some internal standards to follow while developing rest services. Some queries returns list of entities, for example lets consider we have image galleries retrieving service:...

fullcalendar events from REST-ful php server.

I've written a very simple RESTful php server (my first experiment with REST, so feel free to make suggestions) to respond to the fullcalendar events callback. It produces exactly the same string output as the json-events.php file in the fullcalendar json example, but for some reason fullcalendar will not accept my server's output. I...

pass ...rest to a NetConnection call

I want to pass a rest in a netconnection call, something like this: public function requestData(service : String, ...params) : void { nc.call(service, params); } this doesn't work since the call is expecting each parameter to be separated by commas, like: nc.call(service, params[0], params[1], params[2]); I've read some posts abou...

Regarding Creating Business application using Silverlight

Hi, We are in the conceptual phase to create a relatively medium size enterprise business product application using Silver light 4.0, Entity Framework and WCF. 1. Is it adivceable to use Silverlight 4.0 for this enterprise business application development or should we go in for MVC.NET / ASP.NET? 2. We have planned to use REST based WCF...

User Database Script for iPhone API interaction

Is there any kind of PHP script that has a user database with custom tables that I can access through a RESTful API? I am wanting to create an iPhone app that interacts with the user database.. such as register, login, update info... Any ideas? Thanks! ...

jQuery encoding values differently than expected for jQuery.ajax data elements

I'm using jQuery.ajax() to make a PUT request to a REST web service, but seeing some really strange serialization behavior. (Before you say it: Yes, I know that not all browsers support PUT -- this is just an example implementation for an api/framework, and ultimately will not be called by a browser, but rather by a server-side library ...

libcurl (c api) READFUNCTION for http PUT blocking forever

I am using libcurl for a RESTful library. I am having two problems with a PUT message, I am just trying to send a small content like "hello" via put. My READFUNCTION for PUT's blocks for a very large amount of time (minutes) when I follow the manual at curl.haxx.se and return a 0 indicating I have finished the content. (on os X) Wh...

WCF REST with jQuery AJAX - removing/working around same origin policy

So I'm trying to create a C# WCF REST service that is called by jQuery. I've discovered that jQuery requires that AJAX calls are made under the same origin policy. I have a few questions for how I might proceed. I am already aware of; 1. The hacky solution of JSONP with a server callback 2. The way too much server overhead of having a ...

How to migrate deploy RESTful WCF Web Service from IIS 6.0 to IIS 7.0

Hi all, I have a WCF Restful Web Service. It works find under VS and IIS 6.0. Now I want to move it to another work station with IIS 7.0 on it. I tried to copy all the deploy file from IIS 6 to IIS 7, but it cannot be accessed by other client, except for the request from it's own machine. I don't know what's wrong and I tried to enable t...

On REST: WADL or not IDL, is the following approach right ?

This question is a bit long, please bear with me. In REST, i think we should not need WADL or any IDL. But rather something that would implicitly cover its concept. The way I think about it is when we (humans) surf the Web, when we go to a web site for the first time, we don't know what services it provides. You discover those on the ht...

Rest Content Negotiation and Caching

I'm wondering how caching works with content negotiation based API. Since the to get a resource in XML or JSON, the URI will be the same, for example: http://example.com/bikes/mountain The service returns JSON / XML based on the Accept type header. How smart are caches? For example: if one client requested this using Accept t...

How do I track users(clients) in a REST GET calls

We have a Public REST application which has a lot of GET's from the clients . We have a way to track the POST calls but we do not have a way to track where the user has come for the GET calls . Our intention is to have some client specific business rules if we are able to decide where the call has come from ? ...