rest

Can anybody explain OAuth to an idiot?

That idiot being me. I've read a bit about it at http://oauth.net/ , it's "a simple way to publish and interact with protected data" apparently. I think it's exactly what I need to provide a secure way of accessing data from an android/iphone app via a REST web service, but I can't work out exactly what it is. So, put simply, what exa...

Advantage of RESTEasy over Apache CXF ?

I have Restful web-service implemented using Apache CXF. Since I am going to use JBoss for deployment, I am thinking of moving to RESTEasy as it provides better JBoss integration. What are the advantages of RESTEasy over Apache cxf apart from better server integration? ...

Ruby URI Manipulation

Hello, Is there any way to manipulate a URI in Ruby to accept parameters without the use of ? and &? For example, I wish to do the following: http://localhost:5000/service/get/ip/port instead of http://localhost:5000/service?ip=192.168.1.1&port=1 To return information for a given device. This would utilizes a fully REST-based i...

Using RESTful architecture to access multidimensional data

How should we use REST to access multidimensional data in an efficient way? The choices seem to be hi-REST, lo-REST, or OpenSearch (which seems like a specialization of lo-REST). ...

ADO.NET data services Combining Orderby and expand on REST

Hi, I am trying to get the list from server through javascript using following var request = new Sys.Net.WebRequest(); request.set_httpVerb("GET"); //request.set_orderby("Created"); request.set_url("http://sps2010:39153/_vti_bin/ListData.svc/MyList?$expand=CreatedBy"); request.get_headers()['Accept'] = 'application/json'; request.add_c...

WCF REST: Maximum number of strings which can be passed in a webInvoke method?

Here is the code below I tried this call but it didnt work... even if the function inside this call is empty i tried this exact function call with only 5 input parameters and it worked? Something is fishy here hopefully someone can suggest and if you have anyway i can minimize this code meaning the parameters passes im open for suggesti...

400 bad request from twilio's REST API using twilio-ruby

I'm trying to get started with Twilio's REST API using the rubygem twilio-ruby, and I've hit a snag. Here's my code: h = {:From => "123-123-1234", :To => "123-123-1234", :Body => "hey"} account = Twilio::RestAccount.new(ACCOUNT_SID, ACCOUNT_TOKEN) resp = account.request("/#{API_VERSION}/Accounts/#{ACCOUNT_SID}/SMS/Messages", 'POST', h) ...

Logout: GET or POST?

This question is not about when to use GET or POST in general; it is about which is the recommended one for handling logging out of a web application. I have found plenty of information on the differences between GET and POST in the general sense, but I did not find a definite answer for this particular scenario. As a pragmatist, I'm in...

Spring MVC @PathVariable getting truncated

I have a controller that provides RESTful access to information: @RequestMapping(method = RequestMethod.GET, value = Routes.BLAH_GET + "/{blahName}") public ModelAndView getBlah(@PathVariable String blahName, HttpServletRequest request, HttpServletResponse response) { The problem I am experiencing is that i...

A distinct HTTP status for not logged in vs. not authorized in a RESTful API

So send a few different status headers in my API including 404, 409, 201, 302 and the like. Now I'm running into issues with 401 Unauthorized. I'm currently sending it if a user is not logged in (the entire API is rights managed) or if a user doesn't satisfy the specific access requirements for the particular resource being retrieved/mod...

Using JSON.NET with RESTful WCF service in .NET 4

Has anyone got a RESTful WCF service (in .NET4) successfully using JSON.NET to do serialization/deserialization? What's the best approach? ...

RESTful Services Samples Generation

What is the fastest way to create a list of RESTful services from data structure or simple XML files? (even with configuration files.) Is there any tools that can read a DB or a Python/Java/.Net class and generate RESTful services? Prefer something that runs on Apache or Tomcat. Programming language is not a concern, I just need to...

Securing a URL using a username-password

I am working on creating a toolbar application that will invoke a URL on the server and increase a User's points(as an incentive to use the toolbar). Right now the URL is a GET(I can and will change it to POST). The issue is, I need to make sure that someone cannot, using any sort of a hack, increase the points. The URL is ofcourse a pu...

hiding attributes from inherited_resources rest methods

I want to use REST in an Rails application that uses inherited_resources, but I want certain properties not to be revealed during json and xml request. Let's call that field 'password'. I know I can overwrite the to_xml and to_json methods and then super :except => [:password] But I would have to do that for to_xml and to_json. Not ...

Restful API authentication recommendation?

I am developing several RESTful API for 3rd party to call, and these API need authentication (apikey & secret based), and authorization (HTTP method & URI based). Are there any existing software we can reuse that prevent me from rolling out our own implementation for the security layer? ...

If I want my iOS app to use a RESTful WebService that returns XML data, which APIs do I want to start learning?

Hello. I'd like to build in some weather functionality into my app and I'm going to be using the NOAA weather web service to retrieve the weather information. The NOAA website has a great deal of information on how the data should be requested and how the resulting data is structured. I'm new to iOS development, so I just need a littl...

RESTful 1-N optional relationships

I trying to learn how to write RESTful apps in Java using Jersey and Hibernate, and I'm struggling to understand how to handle parent/child type relationships when POSTing data to a Resource. I'm using JSON to exchange data, but I don't think that's particularly relevant to my problem. The example I'm working with models the relationshi...

How to correctly send json data via Net.WebRequest - PowerShell

I am working on a powershell script to post json data to a REST interface and am getting (400) Bad Request on each time. I am new to this, and am unclear as to if/how I should be encoding the data. I know I need to set the contenttype to application/json, but is the encoding choice I am using what is causing my problem, and if so what ...

[PHP 5] Create a REST service

I want to create a REST service with PHP 5. I'd appreciate it if people would recommend some guides/tutorials on the subject. I'd like tutorials that cover the whole process, including the creation, securing and deployment of the service. Thanks. ...

WCF REST service hosted in IIS does not support PUT and DELETE

I created a WCF REST (aka WebHttp) service in .NET 4, using Microsoft's WCF REST Service Template 40. I am hosting the service in IIS 6. The Service Template uses the RouteTable in the Global.asax as a way to create "clean" URL's that don't include ".svc" in them. For example: http:// localhost / flights / 878 GET and POST work fine a...