rest

Handling PUT/DELETE arguments in PHP

I am working on my and I am struggling to work out how to send PUT and DELETE arguments in PHP. In a few places I have seen people using the options: $this->option(CURLOPT_PUT, TRUE); $this->option(CURLOPT_POSTFIELDS, $params); Annoyingly, this seems to do nothing. Is this the correct way to set PUT parameters? If so, how do I set ...

.htaccess rewrite with REST style URL 500 error

Hi All, I'm trying to implement a REST-style URL with a mod-rewrite turned on in .htaccess. There's a bit of a kicker which is that I'm developing in a test environment (new cpanel account). Here's the .htaccess: RewriteEngine on #REMOVE THIS LINE ON SITE LAUNCH! RewriteBase /~myNewAccount/ #Hide .php extensions for cleaner URLS Rew...

Why would one develop a desktop client for Google Docs?

Google provided very comprehensive online version of Google Docs which is quite feature rich and reliable. I'm thinking of a desktop version built on their API & RESTful services. Yet I'm in early stage of reasoning and doing analysis. Inarguably it's good to improve skills, gain experience and create great tutorials for RESTful web ser...

common tracking work in wcf rest!

hi, i am working on wcf rest. i would like to do the following tracking work. track the user Real ip address track from where did the user came from ?i know i can use the referer header but since this is something very common task which most of the people do it would be better if some code is provided.in short i want to do the campaini...

wcf rest with AspNetCompatibilityRequirements

i have a wcf rest service which is being polled by the client . i want to access iis server variables without enabling AspNetCompatibilityRequirements since that causes performance hits which my polling application cannot effort. any suggestions? ...

How to use CXF, JAX-RS and HTTP Caching

The CXF documentation mentions caching as Advanced HTTP: CXF JAXRS provides support for a number of advanced HTTP features by handling If-Match, If-Modified-Since and ETags headers. JAXRS Request context object can be used to check the preconditions. Vary, CacheControl, Cookies and Set-Cookies are also supported. I'm really interes...

Rails Rest API External Testing

I am building a REST Web Service layer on top of a Rails app that will be used by an Iphone application. The response format is XML. I would like to build some acceptance tests that should be external to the rails stack (and should test everything, including the http server). The test scenarios are quite complex, involving the process ...

StreamReader ReadToEnd() after HttpWebRequest EndGetResponse() - most scalable?

I am calling a RESTful web service in the back-end of some ASP.NET pages. I am using ASP.NET asynchronous pages, so under the hood I am using the methods: HttpWebRequest BeginGetResponse() and HttpWebRequest EndGetResponse() The response string in my case is always a JSON string. I use the following code to read the entire s...

Restlet: Log Stack Trace for All 500 Errors

I'd like my Restlet application to log the stack trace for any Resource that generates a 500-series HTTP error (using the Context's Logger). As far as I can tell, this is not the default behavior. In other words, I don't want my Resource classes to have any logger code at all in the represent and acceptRepresentation methods - they just...

What should an XML post request look like for WCF RESTful service with a single parameter?

I am having trouble working out what my XML should look like when performing a post request through WCF REST services. When using a datacontract i have no problem at all but when i just want to send across one parameter for example an int, i get the following error - "The remote server returned an error: (405) Method Not Allowed. " [Ope...

Uploading files in RESTful way?

I'm designing a RESTful API that should handle binary file uploads. Should this be done the same way as html form upload or is there a better way? ...

Exposing database query parameters via REST interface

I have the basics of a REST service done, with "standard" list and GET/POST/PUT/DELETE verbs implemented around my nouns. However, the client base I'm working with also wants to have more powerful operations. I'm using Mongo DB on the back-end, and it'd be easy to expose an "update" operation. This page describes how Mongo can do upda...

Not repeating a path twice in Spring 3.0 MVC Restful mappings

I'm mapping the url /modules/tips/SOME_ID/small to access the tip with id SOME_ID and to render it using the view small.jsp. The following code works great for this, however I am forced to repeat the string modules/tips in two places. Spring MVC doesn't seem to have a convention for this that I can determine. Other than using a consta...

Node.js REST framework?

Just got node.js running on an ubuntu server instance. Got a couple of simple server apps running. Does anyone know of any REST frameworks that have been built or are in development? ...

How to find type of Annotated function parameter

Suppose I have a function public int doSomething(@QueryParam("id") String name, int x){ .... } How can I find the type of the annotated parameter 'name'. I have a handle to the java.lang.reflect.Method instance of the function doSomething and using the function getParameterAnnotations(), I can obtain the annotation @QueryParam but am...

Does the Content-Type of a POST or PUT request need to be 'application/x-www-form-urlencoded' in a WCF ReSTful service?

Hello everyone. What I am trying to do is, seemingly, simple: send some POX via the request body, have the WCF service process it, and return a 201 status code. In my ServiceContract I have defined the following method: [WebInvoke(Method = "PUT", UriTemplate = "/content/add", BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = ...

WCF REST: passing a generic list as a request

I have a POST with a WebMessageFormat.Xml. It's a simple method that takes in a Company object. Aside from simple types containing "CompanyId", "CompanyName", "CompanyDescription etc., inside the XML there is a series of the same element containing tons of metadata involving contacts. I wanted to pop that into a List. [DataContract...

REST Web Services API Design

Just wanted to get feedback on how I am planning to architect my API. Dummy methods below. Here's the structure: GET http://api.domain.com/1/users/ <-- returns a list of users POST http://api.domain.com/1/users/add.xml <-- adds user POST http://api.domain.com/1/users/update.xml <-- updates user DELETE (or POST?) http://api.domain.com/1/...

Web service for retrieving chunks of data

Hi, I'm planning to develop a webservice, and I like to try the RESTful architecture. The issue is that I don't know if the service is adequate for it, or it is better to use SOAP. The service is about downloading some data from the server to a device on the local computer. The data will be split into chunks. The service will be run wi...

How to POST Data to another web application using REST or otherwise

Hi Please consider the following scenario, There are two web applications App1 & App2. A user would submit his information on App1 though a form. On click of a specific button/link on App1, the same data should be posted to a page on App2 and the user should also be redirected to the same page on App2. I would like some help in find...