rest

How should I sanitize user data when integrating with a REST API for registration and authentication?

I'm writing a Drupal module to integrate with a custom Java-based REST API for creating, authenticating, and managing user accounts. I'm using drupal_query_string_encode to encode the calls I'm making to the API. Should I also use something like check_plain (or something else) to sanitize username, password, & email values before callin...

Can you use a custom membership provider with userNamePasswordValidationMode?

Every example I see uses the default Membership Provider with the userNamePasswordValidationMode, but can I specify MembershipProvider for userNamePasswordValidationMode in the ServiceCredentials for a WCF REST Service if I have a Custom Membership Provider? Is the following route the best to take if this is possible: Create a custom ...

Inject behavior into WCF After or During identification of WebGet Method to call.

I am trying to solve a problem where i have a WCF system that i have built a custom Host, Factory host, instance providers and service behaviors to do authentication and dependency injection. However I have come up with a problem at the authorisation level as I would like to do authorisation at the level of the method being called. For ...

How can a PHP REST API receive PUTted data?

I'm writing an API and want to follow the REST approach. As I understand it, if I want to let API users update specific records a PUT http://server/specific_resource type request should be supported. Of course, they're not doing a GET and they'll need to pass along the new data and my question is how to do this (in my specific case only ...

How to Consume JSON as input in PUT and POST method of REST webservice in java

Hello All. I am trying to create a REST web service using JAX-RS. In that, I have PUT method or POST method which consumes the json as mediatype in the REST web service. Can I know how to call these methods from the client side. How do we pass that json as input from client side to those PUT and POST method and how would we consume the...

What is REST call and how to send a REST call?

Hi, everyone, I want to ask some questions about the REST call. I am the green for the REST call and I would like to like what is REST call and how to use the URL to send a REST call to the server. Can anyone give me some basic tutorial or link for my to reference? Besides, if I want to send a REST call to the server, what should I do...

specific user data using Spring 3 REST

I'm trying to find the standard way to handle user authentication in a RESTful webservice using spring. i want to allow a LOGGED IN user to access only specific information that applies to him. i found 2 ways of doing that: using HandlerInterceptorAdapter i can take the HttpServletResponse and from it i can take the session. in the s...

SmartGWT RestDateSource and Paging (Large DataSet of) Dynamic Data

Hello I have a database table for log messages and at any time there can be inserted new rows. I want to show them in grid and when you scroll down I want to request more rows form this table (server side) but without to be affected from new added rows. The new rows only have to be visible if I refresh the whole grid. I'm not sure how ...

Android; are there any disadvantages to using XML parsing frameworks over SAX/DOM?

I'm experimenting with REST and XML on an Android application, primarily to create a REST client For handling XML returned from a given REST service, I'm tempted to use a simple framework such as XStream. This allows me to easily map an object onto XML and vice versa, it doesn't come with the memory overhead like DOM, and requires consi...

How to implement a stateless REST API

I am working on a REST API that will be used by developers writing mobile apps. Users will be able to use 3rd party services (Google, Twitter etc) to authenticate themselves, this is mainly handled by OAuth (depending on the service in question). We use 2-legged OAuth between the client application and the API Server (where the consumer ...

Cost of serialization in web service

My next project involves the creation of a data API within an enterprise framework. The data will be consumed by several applications running on different software platforms. While my colleagues generally favour SOAP, I would like to use a RESTful architecture. Most of the applications will only need a few objects at every call. Othe...

Response time Issue in WCF REST Service returning a large file

HI, I have created a WCF REST service with response format as JSON. The basic functionality of the service is that when it is called it will return a large file(mostly zip file) from the file system to the requester. The time taken for the file to completely downloaded by the user is taking more than 20 mins for 20MB file. How to find ...

Does it make sense to create a RESTful service that I can send a binary file to?

As the question states - I want to send a binary file to a webservice. Does it make sense to think of this in a REST kind of way? Does it make sense to "POST" binary data, and how would you set up the receiving web service? I am working in grails, and I am trying to set up a service that will allow one web service to pass it a file, and...

How should I deal with object hierarchies in a RESTful API?

Hi I am currently designing the API for an existing PHP application, and to this end am investigating REST as a sensible architectural approach. I believe I have a reasonable grasp of the key concepts, but I'm struggling to find anybody that has tackled object hierarchies and REST. Here's the problem... In the [application] business ...

NoSQL WideTable system which supports Column Value based Queries?

I'm currently evaluating possible NoSQL WideTable systems for use as a storage backend for an experimental project I'm working on but I'm struggling with the fact that many of these seem to have vague/incomplete documentation and it's hard to determine whether a specific feature is supported. Specifically I need to be able to do queries...

Alternative to CSV?

I intend to build a RESTful service which will return a custom text format. Given my very large volumes of data, XML/JSON is too verbose. I'm looking for a row based text format. CSV is an obvious candidate. I'm however wondering if there isn't something better out there. The only I've found through a bit of research is CTX and Fiel...

how to get an arbitrary file from an HTTP request in grails

I am trying to set up a web service in grails that can accept a file. How do I get the file from the request? I am testing this with something like curl -d somefile.tar http://localhost:8080/MyWebS/fileWS and my method looks like the following: def index = { switch(request.method){ case "POST": render "Ingesting file\n...

How are REST Array Parameters handled over MultiPart Form and XMLRPC?

Im using an API and one of the ways this API works is it lets you declare an array of parameters for some calls. The way they describe the rest request looks like this: http://example.com/?params[]=option1&params[]=option2 This declares 2 array parameters in the array of parameters (option1 and option2) How would these be sent ov...

How to override the XML handler in the Struts 2 REST plugin

Hi, I am working on a Java web app that uses Struts 2 with the REST plugin. By convention, any URL that ends with ".xml" will be sent through the XStreamHandler. This is fine--it's what I want in most cases. But in just a small number of cases I want to stream XML back to the browser. I know how to set up a @Result(type="stream") an...

PHP REST webservices Curl help

I have used the following script to consume REST webservices provided by Commission Junction. I'm able to get the response but the response is not in xml format. <?php $targeturl="https://support-services.api.cj.com/v2/countries"; $CJ_DevKey= "xxxxxxxxx"; // return xml feed from CJ $ch = curl_init($targeturl); curl_setopt($ch, CURLO...