rest

Is it O.K. if our RESTful Web Service doesn't support XML?

Our web service only supports JSON. We respond with JSON if we can or respond with an HTTP Error 406: Not acceptable if the client asks application/xml... Is it still considered RESTful? ...

Getting started consuming web services in a Ruby on Rails 3 application

So I'm getting started learning Rails. Now that Rails 3 is out, I want to stick to learning the Rails 3 way of doing things. One of the things I want to learn how to do is how to consume web services / work with third party REST APIs / create "mashup" applications. I've only done minimal work like this with PHP and pre-built libraries. ...

If someone said their web app was RESTful, what types of features would you assume it contained?

I was reading about a blog application that was described as RESTful. If someone told you their web application was RESTful, what types of features would you assume it contained, to differentiate it from a non-RESTful web application? ...

REST web service in python 3?

Hi, I'm new to the python world and I'm currently in a new project using it. So since we we're there to learn, we chose to start with python 3. Now, we need to make a RESTful web service. After reading a few, I found out that the most used framework for web services is Django... and I also read on the Django website that it does not yet ...

WCF 4.0 REST Service configuration problems

I'm facing problems trying to expose a simple WCF 4.0 service as a restful. It's SOAP part works fine. My operation contract is marked with [WebGet(UriTemplate="example/{param}")] and my web.config contains the folowing <services> <service name="Service1"> <endpoint address="data" binding="webHttpBinding" behaviorConfigurati...

J2ME, how to encode and decode Json?

how to encode and decode Json in J2ME? ...

Geocoding with Timezone information

Is there a good way to get Timezone information with DST information from a lat/long coordinate or a physical address? I've found some web services that seem to offer this service, but I can't tell how reliable they might be, or if they might disappear at some point. I need something for my application that will be around long term. ...

Unable to use IList<xxxObject> to send data from Rest WCF service to Java client consumed by Android

Hello, I run Rest WCF Service(webHttpBinding) that returns IList and two clients. First client is WCF Client in .net, which able to receive the list of objects correctly. Second client is Java Client consumed by Android, which able to receive the Object correctly, but not a list of objects. Your help will be very appreciated. ...

about rails' routes, adding collection routes to restful resources won't generate named route helpers ?

namespace :admin do resources :posts do collection do get 'whatever' end end end I was expect that will generate 'whatever_admin_posts_path' helper method, but it didn't. It's there something wrong with my codes? Or a bug in rails? ...

What's a good HTML naming convention for model binding complex nested types?

If I have an object that is composed of nested complex types, e.g. a ViewModel that has a List<Fu> and a List<Bar> public class WarViewModel { List<Fu> Fu { get; set; } List<Bar> Bar { get; set; } } public class Fu { public int Id {get;set;} public Soldier Private { get; set; } } public class Bar { public int Id {g...

Best work around to fix DateTimeOffset over WCF Data Service issue

I try to create a WCF Data Service for an Entity Framework model, which contains some attributes of type DateTimeOffeset. However the WCF Data Service does not support the type DateTimeOffset as I found out after googling the exception text "The property 'CreationTime' on type 'Task' is of type 'DateTimeOffset' which is not a supported p...

Looking for recipe: Multiple async Ajax requests in JavaScript

I am about to spend a lot of time solving a problem, and I wonder if there is an existing recipe for this. It's a browser-based application (JavaScript and Dojo Toolkit) that is a client of a RESTful Web Service. It uses Comet to automatically update the display. There is a callback function that processes every message received. [Bo...

How do I add basic authentication to a Python REST request?

I have the following simple Python code that makes a simple post request to a REST service - params= { "param1" : param1, "param2" : param2, "param3" : param3 } xmlResults = urllib.urlopen(MY_APP_PATH, urllib.urlencode(params)).read() results = MyResponseParser.parse(xmlResults) The problem is that the url used to ...

Modifying Python code to use SSL for a REST call

I have Python code to call a REST service that is something like this: import urllib import urllib2 username = 'foo' password = 'bar' passwordManager = urllib2.HTTPPasswordMgrWithDefaultRealm() passwordManager .add_password(None, MY_APP_PATH, username, password) authHandler = urllib2.HTTPBasicAuthHandler(passwordManager) opener...

Chrome view-source versus POST

When you ask Chrome to View/Source, it resubmits your URL as a GET, even if it got there in the first place as a post. Is there some way around this for those of us debugging JAX-RS services invoked from forms that can't work with GET? ...

RESTful: bidirectional communication

I was wondering if it is possible to have a RESTful web service and a bidirectional communication with the clients and server. In my case the state on the server can change, so the server should send a message to the clients to update themself. Perhaps that's totally against the RESTful idea. Can I AJAX help me with this issue? Thanks...

How to set a RESTful call?

Hi, everyone, I want to ask a question about the RESTful. I want to click a URL and make a RESTful call. However, I don't know what kind of information do I need to send with the URL, cookies?http header? Can anyone help me? Thank you. ...

Staying RESTful while performing AJAX server-side validations?

My Rails application has a number of forms. When Joe uses my app, I want each form to provide him with immediate visual feedback as to the validity of his input for each field. One field checks the format of his email address - pretty simple. But another allows him to associate the current resource with a number of other resources, and c...

Succinct and light-weight API: REST+JSON in .NET

Hi all, Summary: I need to know if there is an existing light-weight implementation of REST+JSON in .NET world which does not use WCF. If not, I am looking for some folks who would be interested to start a joint venture for an Open Source project. I do not know about you but I was a big fan of WCF when it came out and I praised its des...

Implementing Security in REST?

Hello All, I am concerned on how to implement security measures may it be Authentication or Authorization.. How can these be implemented.. if you have any thoughts or links that you can share with regards to WCF REST 4.0 Security and if you've implemented it also the better. because ive been trying to find out on this topic all i find i...