lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <>
Subject Re: REST calls
Date Wed, 30 Jun 2010 13:25:41 GMT
On Wed, Jun 30, 2010 at 9:17 AM, Jak Akdemir <> wrote:
> On Wed, Jun 30, 2010 at 7:39 AM, Don Werve <> wrote:
>> 2010/6/27 Jason Chaffee <>
>> > The solr docs say it is RESTful, yet it seems that it doesn't use http
>> > headers in a RESTful way.  For example, it doesn't seem to use the
>> Accept:
>> > request header to determine the media-type to be returned.  Instead, it
>> > requires a query parameter to be used in the URL.  Also, it doesn't seem
>> to
>> > use return 304 Not Modified if the request header "if-modified-since" is
>> > used.
>> >
>> The summary:
>> Solr is restful, and does a very good job of it.
>> The long version:
>> There is no official 'REST' standard that dictates the behavior of the
>> implementation; rather, REST is a set of guidelines on building APIs that
>> are both discoverable and easily usable without having to resort to
>> third-party libraries.
>> Generally speaking, an application is RESTful if it provides an API that
>> accepts arguments passed as HTTP form variables, returns results in an open
>> format (XML, JSON, YAML, etc.), and respects certain semantics relating to
>> HTTP verbs; e.g., GET/HEAD return the resource without modification,
>> are destructive, POST creates a resource, PUT alters it.
> Actually it is not a constraint to use all of four *GET*, *PUT*, *POST*, *
> To define RESTful, using Get and Post requests are enough as Roy Fielding
> offered.

In Roy's post, I'd point out: "POST only becomes an issue when it is
used in a situation for which some other method is ideally suited"
(e.g. DELETE to delete).

Also, GET and POST *could* be enough if and only if you took care to
design your resources properly[1].


[1] -

View raw message