rest

What happens if I miss facebook's callbacks?

What happens if I miss facebook's callback, because my app is down, or had an error or something? Will facebook retry later? ...

Hibernate lazy loading + Jersey REST = eager loading?

I'm developing a Client-Server-Application with Hibernate as persistence layer and Jersey REST for network communication. Given a user with roles: when I want to display all users in the client, I don't want the roles to be loaded by Hibernate and I don't want them to be sent over the network when I want to modify the user's roles, I...

JSON and XML from Roo RESTful controllers

Hi, I've got my Spring Roo project set up and it's all great, but the views are rendered with Tiles, and I'd love to have them just rendered to JSON (possibly to XML) so that I can use them directly as webservices. Do you have any suggestions to how I should do this "the Roo way"? Cheers Nik ...

Supporting HTTP 100 Continue with PHP

I'm working on a PHP webapp that accepts large POSTed file uploads from specific clients and would like to accept or reject these uploads (based on various headers and other factors, not just size) before the file is uploaded by using HTTP/1.1 100 Continue. Some quick background from HTTP/1.1 spec 8.2.3: The purpose of the 100 (Cont...

Add method comment with Jersey

hi, We've been using Jersey for our webservice and it's been great and straightforward. Is there a way to add a small description comment within a method definition (maybe using an annotation like @Description): @GET @Path("/schema/classes/") @Produces( { APPLICATION_RDF, TEXT_N3, APPLICATION_JSON }) @Description("Lists all ontology cl...

Can I insert PHP variables into a JSON string?

I am using a REST API to POST attributes to a person using json. My request body looks like this: $requestBody = ' { "attribute": { "@id": "", "@uri": "", "person": { "@id": "222", "@uri": "https://api_name_removed.com/v1/People/222" }, "attributeGroup": { ...

Error calling a WCF REST service using JSON. length quota (8192) exceeded

I’m having a WCF REST service hosted in IIS using .NET 4 RC. The POST calls to the service are serialized using JSON. Everything works fine until the size of one of the DataMember (string) is longer than 8K. In this case I receive the error described below indicating the MaxStringContentLength has been exceeded. The maxStringContentLengt...

Rails Routing with Query String

I have a problem where I need values passed in from a GET request and I don't know how to set up the routing definition. My Category object has a type(string),a color(string) and many products. I want to create a simple web service that lets the caller get all of a Category's products by passing in the Category's type and color: http:...

Suggestions on RESTful Java Web Services Framework... ...

I googled some information about web services, it seems like a enterprise level application. I found that RESTful design is very cool idea on this. I find that Apache CXF looks cool, it support RESTful design and Java. It is a good choice for beginner to start writing an application using Apache CXF? or any other framework is suggested? ...

Pretty (dated) RESTful URLs in Rails

I'd like my website to have URLs looking like this: example.com/2010/02/my-first-post I have my Post model with slug field ('my-first-post') and published_on field (from which we will deduct the year and month parts in the url). I want my Post model to be RESTful, so things like url_for(@post) work like they should, ie: it should gen...

RESTful Web Services: method names, input parameters, and return values ???

I'm trying to develop a simple REST API. I'm still trying to understand the basic architectural paradigms for it. I need some help with the following: "Resources" should be nouns, right? So, I should have "user", not "getUser", right? I've seen this approach in some APIs: www.domain.com/users/ (returns list), www.domain.com/users/user ...

Does facebook have a public search API yet?

I can't seem to find the definitive word out there of the facebook search api: the api that allows you to search public status updates and comments/posts (there is a web interface for all logged in users for this at the moment). ...

url_for of a custom RESTful resource (composite key; not just id)

Given the following resource definition: map.resources :posts, :except => [:show] map.post '/:year/:month/:slug, :controller => :posts, :action => :show I can make url_for work for me, using this syntax: <%= link_to @post.title, post_url(:year => '2010', :month => '02', :slug => 'test') %> But is there a way to make this work? <%=...

Guide for creating ASP.NET MVC RESTful API on Azure

I want to create a simple ASP.NET MVC RESTful API, but I want to create it on Azure. Any recommendations, tips & tricks, or examples on how to do this? ...

Using a REST API and iPhone/Objective-C

So I'm brand new to Netflix's API and have never used an API ever before. I'm ok with Objective-C and Cocoa Touch but just have no clue where to start when accessing the API and how to in general. Can someone help me get started with some code that will access titles in Netflix or just how to access a REST API in general with authenticat...

Make Yahoo UI autocomplete work with WCF REST webservice

Hi, I need to implement autocomplete functionality using Yahoo UI autocomplete (http://developer.yahoo.com/yui/autocomplete/). The datasource for this autocomplete feature is a WCF REST service. Can anyone post sample code for this scenario. Thanks ...

WCF RESTful Services Using Interface with Generics

I have an interface similar to this: [ServiceContract] public interface IBaseService<T> { [OperationContract] [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)] List<T> LoadById(string value); [OperationContract] [WebInvoke(Method = "GET", BodyStyle = WebMessage...

Can I use a WCF RESTful service from Silverlight?

I have a WCF RESTful service using the WebHttpBinding and I want to know if I can use this in Silverlight 3 without any modifications? ...

What are some viable techniques for combining CSRF protection with RESTful APIs?

I'm interested in hearing what approaches people have taken when building a RESTful (or quasi-RESTful) API for their web applications. A practical example: Say you have a traditional browser-based web application which uses CSRF protection on all forms. A hidden input with a CSRF protection token is included in each form presented in ...

RESTful multi-step / multi-page forms in Django (ideas/examples)

What are some RESTful ways to transition between pages of a multi-page form in Django? My current method: form POSTs to same page form view validates and stores POST data in session form view redirects to the next form page upon successful validation. next form checks if previous data exists. if not, redirects to first form. Are ...