rest

Solution Structure and Restful ASP.NET MVC

In making a restful ASP.NET MVC app I'm wondering about the best way to structure the projects in my solution. By convention, the controllers reside in the same project as the views. However, if I have a few different presentation tiers accessing my restful controllers, would it be better to put my controllers in a layer (project) lower ...

In WCF web programming model, how can one write a operation contract with an array of query string parameters (i.e. with the same name)?

Using WCF Web Programming model one can specify an operation contract like so ... [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Xml,         UriTemplate = "SomeRequest?qs1={qs1}&qs2={qs2}")] XElement SomeRequest1(string qs1, string qs2); Now if we had to make a contract that acce...

How to remove thie ".svc" extension in RESTful WCF service?

In my knowledge, the RESTful WCF still has ".svc" in its URL. For example, if the service interface is like [OperationContract] [WebGet(UriTemplate = "/Value/{value}")] string GetDataStr(string value); The access URI is like "http://machinename/Service.svc/Value/2". In my understanding, part of REST advantage is that it can hide the ...

Writing data into a database using a fully REST web service

How would one create a REST web service to write a row into a databse table. Use the follwoing scenario: The table is called Customer - the data to be inserted into the row would be the name, addresss, telephone number, email. I think its impossible to describe the whole thing end to end in Java or C#, and I would never expec...

getJSON call working on IE 7 but not Firefox 3...

Hi all, I have a web application that uses the current version of JQuery that needs to get some JSON objects back from a REST web service. I'm using the following call to $.getJSON: $.getJSON("http://localhost:17245/Service.svc/?format=json", function(data) {alert(data.id);}); This call works fine in IE7 and I can call the service wit...

PHP detecting request type (GET, POST, PUT or DELETE)

How can I detect which request type was used(GET, POST, PUT or DELETE) in php? ...

Can I send request in PUT and DELETE in Delphi 7?

Title says it all, I need to send PUT and DELETE along with POST, GET to a REST API how can I do it? ...

What is the best approach for building an iphone client for a rails app?

I have a fairly standard rails app and would like to be able to access the basic CRUD (Create, Update, Delete) operations as well as queries I have added, from an iPhone app. Rails provides the REST API for these operations more or less out of the box. What is the best approach to deal with the REST/XML part on the iphone, and are ther...

Delphi 7 & ICS sending DELETE requests

How can I send a DELETE request with delphi 7 and the ICS component so that I can access a REST api? ...

Testing REST web service client when the services don't yet exist

I have already read the posts link text and link text but these are covering the use case of building a REST service on the server and requiring a rapid client in order to test those services. We have the opposite problem, we are building a web client that will communicate to the server via REST, but the decision has been taken to let t...

Asynchronous vs Synchronous vs Threading in an iPhone App

I'm in the design stage for an app which will utilize a REST web service and sort of have a dilemma in as far as using asynchronous vs synchronous vs threading. Here's the scenario. Say you have three options to drill down into, each one having its own REST-based resource. I can either lazily load each one with a synchronous request, bu...

Geocoding libraries

Hi, I'm using python and I need to map locations like "Bloomington, IN" to GPS coordinates so I can measure distances between them. What Geocoding libraries/APIs do you recommend? Solutions in other languages are also welcome. Best, Bruno ...

Can I change the headers of the HTTP request send by the browser?

I'm looking into a restful design and would like to use the HTTP methods (POST, GET, ...) and HTTP headers as much as possible. I already found out that the HTTP methods PUT and DELETE are not supported from the browser. Now I'm looking to get different representations of the same resource and would like to do this by changing the Accep...

Configuration binding extension could not be found.

I have created a simple wcf service which used the WCF Service Library template. Everything works fine when using the default soap bindings, however when i attempt to modify the service to add a REST binding it fails with the following error: "Configuration binding extension 'system.serviceModel/bindings/webHttpBinding' could not be fo...

WCF REST Starter Kit - A property with the name 'UriTemplateMatchResults' already exists.

Hello, I just started with the WCF REST Starter Kit. I created a simple service that return an array of an object. Using the browser, everything works fine but when I use a WCF client, I get an ArgumentException. I'm not using IIS and here is the code: The contract: [ServiceContract] public interface IGiftService { [WebGe...

deeply nested RESTful resources in Rails

I have this structure in my app: USER has_one :publicprofile, :privateprofile PUBLICPROFILE has many :emails, :phonenumbers PRIVATEPROFILE has many :adresses, :creditcards I would like to know how to go about having a profile page for the user where I can update his nested resources (and do it in a RESTful way). I couldn't find any d...

REST Content-Type: Should it be based on extension or Accept header?

Should the representation(html, xml, json) returned by a RESTful web service be determined by the url or by the Accept HTTP header? ...

What is the best way to create RESTful complex queries?

Hello, What's the best way retrieve complex queries from a REST service? Suppose I want to get X collections, apply filters and equations to each one, combine the collections using some other operation and return one result, everything in one request. It is just too complex (and big) to put everything in the querystring since I could ...

Reasonable to hold an HttpUrlConnection open indefinitely to a remote REST endpoint?

I am looking to optimize a process that runs continually and makes frequent calls (> 1 per second on average) to an external API via a simple REST style HTTP post. One thing I've noticed is that currently, the HttpUrlConnection is created and closed for every API call, as per the following structure (non essential code and error handlin...

WCF RESTFul POST question

Hi, I have a WCF RESTFul service declared thus: [ServiceContract] public interface IGasPriceService { [OperationContract] [WebGet (ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "/GetGasPrice/For/ZipCode/{zipCode}" )] GasPriceData GetPriceData(stri...