Another possible solution with such requests, which may take LONG to
process, is to have the server return HTTP 202 (Accepted) as soon as it's
ready to process the request, and the client knows its request will be
processed later.
Of course, you may also need another server resource to query the
Hello,
did you try adding one of the proven production-ready HTTP server connector
jars on your class-path? for example Jetty. We use Restlet with Jetty
HTTP(S) server connector in production without a problem and with many
concurrent clients accessing our server/services.
On Fri, Sep 26, 2014
And I guess an external redirection/URI-rewriting with Apache is not
possible either?
On Wed, Sep 10, 2014 at 7:20 AM, hshorter hshor...@btisystems.com wrote:
Thanks for the reply. Unfortunately I can't change the path of the
application as there are previous versions we have to interop with.
Quick idea, sorry if I don't put little/any code (it may not even work,
trying won't hurt much hopefully...):
Have your whole app below a given URI 'base' path, say: yourapp/
Make the first resource in the routing chain a Filter that will take the
Reference from the Request and a) change its
Damn time zones!!! Congratulations!
El jul 16, 2014 4:50 AM, Jerome Louvel jlou...@restlet.com escribió:
Thanks Xavier and all, it seems we are now in the first position :)
Stay tuned!
Jerome
On Tue, Jul 15, 2014 at 12:33 PM, Xavier Méhaut xavier.meh...@free.fr
wrote:
done :)
Usually you just:
return someRepresentation; // This should automatically set status to HTTP
200 (OK)
or:
setStatus(Status.SUCCESS_CREATED); // Set status to HTTP 201
return someRepresentation;
where someRepresentation is the representation for the response you want
to return for the PUT
@Put
should be enough to tell Restlet to accept anything
El jul 14, 2014 1:16 PM, Frank Kolnick reallyfr...@hotmail.com escribió:
I have tried sending (PUT) with a content-type of text/plain (verified
via Fiddler). On the server side, I have tried:
@Put(text/plain)
@Put(text)
@Put(plain)
Euh... I'm sorry but then the problem must be somewhere else.
I use @Put all the time, handling the different media types myself, and I
only got HTTP 415 when my own-written code explicitly threw
ResourceException(Status.CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE).
can you please try this on your
.
Well, a) and c) (mostly c) is what I had in mind, so we agree :-)
Thanks,
My pleasure.
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel
On Thu, Jun 5, 2014 at 3:52 PM, Fabian Mandelbaum fmandelb...@gmail.com
wrote:
I like the idea.
Some comments:
1
I like the idea.
Some comments:
1) There's some statuses that do not allow for a response body, IIRC HTTP
204. How would you handle that? Compile-time error? Other checks?
2) If for any reason, my server resource class redefines one of those
exceptions, how would this be handled? I'd expect the
I had to do System.exit(0) too to completely finish the thing, besides
shutting down Restlet components and possibly other services, else Restlet
itself is shut down, but the JVM that fired the app is not.
I'm using Apache's Commons Daemon to 'daemonize' the application, and in
the latest
Hello,
I'm trying to switch from HTTP Basic (through an HTTPS channel) to HTTP
Digest (keeping the HTTPS channel) authentication.
I'm currently testing without HTTPS, and I was wondering how should my
'backend' store the user credentials.
Currently I'm using an MD5 hash of the password, so I
.
But before you try that, consider using
CookieAuthenticatorhttp://restlet.org/learn/javadocs/2.2/jee/ext/org/restlet/ext/crypto/CookieAuthenticator.html--
much of the implementation is parameterized and/or overridable.
On Thu, Jan 2, 2014 at 7:29 AM, Fabian Mandelbaum
fmandelb...@gmail.comwrote
operation.
But before you try that, consider using
CookieAuthenticatorhttp://restlet.org/learn/javadocs/2.2/jee/ext/org/restlet/ext/crypto/CookieAuthenticator.html--
much of the implementation is parameterized and/or overridable.
On Thu, Jan 2, 2014 at 7:29 AM, Fabian Mandelbaum fmandelb
Hello there,
our Restlet-based application needs to have users authenticated using both
cookies and http basic (hopefully to be switched to digest soon)
authentication (Actually it's either cookies or http auth, but see below
for auth flow). We also use our own verifier storing credentials on JCR
Hello,
what I don't understand is why you want to execute the DELETE request,
can't you just delete the resource data using the data access layer of your
application? Do the resources you want to delete live inside a different
application?
If all resources, the bulkdeleter and the ones to be
Why not using a 'deleter' resource that will accept a list of resource URIs?
POST /bulkdeleter
[/uri/of/resource1, /uri/of/resource2, ...]
Then, the handler for that resource will retrieve the data matching the
URIs it got (in the above example, a simple JSON array of strings), and
remove it
Hello,
I'm (still, switch to 2.1.x is planned to be done soon) using Restlet 2.0.x
I'm trying to execute WebDAV method PROPFIND with ClientResource against a
Restlet ServerResource and am getting error 1001 in response. The same
server with a client based on a DAV library works OK, and it also
Hello,
I did not test your cases, and I always use full paths to files on my URLs
for static resources inside jars, but... did you try to setup a redirector?
so whenever you hit your resource at /stat or /stat/ you get redirected to
/stat/index.html ? I know it's a hack, and not a fix... and it
Hi Elad,
I don't know if someone already answered this one, or if you already
managed to fix this, but:
Have you tried setting the correct image type, for example
MediaType.IMAGE_JPEG, MediaType.IMAGE_GIF, MediaType.IMAGE_PNG, etc.
Of course, this would require that you do know the image type
If it helps, I only use HTTP 204 response code for successful DELETE
requests. For a POST I think HTTP 201 or 202 is more appropriate... but
that's just the purist in me ;-)
Cheers.
On Thu, Feb 28, 2013 at 7:02 AM, Koen Maes k...@koma.be wrote:
So it is a known issue in IE8/IE9 and supposedly
Hello Daniel,
you should mount (I prefer associate, but that's just me ;)) your
resource, or preferably, another one, at /proxy/{some_resource_id} to
be able to access resources at /proxy/resource_id_1,
/proxy/resource_id_2, etc.
This is because indeed /proxy/ and /proxy/anything are different
Hello,
in production we use the Jetty extension as the HTTP server engine.
we'd like to be able to specify Jetty HTTP connector parameters, like
the ones listed at
http://wiki.eclipse.org/Jetty/Howto/Configure_Connectors
Using restlet 2.0.x
Is this possible? How? Thanks in advance.
--
Fabián
Hello. The correct way to restrict accepted media types for a client
(read: in an HTTP request) is by means of the HTTP header Accept.
Please take a look here:
http://wiki.restlet.org/docs_2.0/130-restlet.html for Restlet mappings
for HTTP headers (that page will tell you the property of which
Hello Paul,
Java and the OS themselves should not allow you to bind to an already
open port, and with Restlet 2.0.x series this is what I've seen here
on my machine, a BindException thrown if I try to start my application
bound to an already open port.
The code to start the application is more
Ok, we've found the solution to the problem. It was indeed a namespace
issue, the following code excerpt works OK:
public Representation propfind(Representation data) throws
ResourceException {
ListDavProperty reqDavProps = new ArrayListDavProperty();
if (data != null) {
Hello Thierry, thanks for your answer. I forgot to tell you that I've
already tried that, but in any way, I've tried differently now, by
using DomRepresentation#setNamespaceAware (my test was with the W3C
classes directly), and here's the result:
28/09/2011 07:50:55
Hello,
I've updated restlet libs for my app to 2.0.9, and now PROPFIND
(WebDAV) requests are not working anymore. Basically, a WebDAV request
has (can have, but most do ;)) an XML entity body. My handler is doing
this (code didn't change):
@Override
public Representation
Hello Brent,
have you tried to annotate your handler with:
@Put(txt)
instead?
On Mon, Jul 18, 2011 at 2:26 PM, Brent Cerrato brent.cerr...@s1.com wrote:
My client resource looks like this:
Client client = new Client(new Context(), Protocol.HTTP);
Usually GET requests do specify filtering parameters on the URL,
that's fine and standard RESTful practice.
IIRC, HTTP discourages sending an entity body with GET requests... I
cannot remember right now, but it may be even disallowed.
If (for example, for security reasons) you MUST avoid sending
Hello Dennis,
besides Thierry's suggestion, here you have the FreeMarkerUtil code:
http://trac.calenco.com/browser/trunk/calenco-utils/src/main/java/com/calenco/utils/FreeMarkerUtils.java
On Sun, May 29, 2011 at 4:55 PM, Dennis Lindeman denli...@ieee.org wrote:
I am having a very difficult
Hello there,
I'd like to have the same Restlet application deployed on different scenarios:
1) Standalone Java Application
2) Service/Daemon
3) Web Application Server (ex: Tomcat) contained
Do I need to create three different projects? Or I just need to
create three different executable sets?
If the verbs of the HTTP standard (they are more than 4 BTW, please
take a look at http://en.wikipedia.org/wiki/Http) together with the
verbs of the WebDAV HTTP extension standard (take a look at
http://en.wikipedia.org/wiki/Webdav) are not enough (they should
be...) you can always do as
Hello list,
I'm sorry to come back to this issue. There's a similar message by
myself on the list for restlet 2.0.1:
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2683866
I've recently stumbled upon this again, and the broken pipes appear to
be related to cancelled
Hello Soumik,
are you 100% sure that the Content-Type (this is the correct spelling)
HTTP header is set to application/xml (or any of its compatible types,
for example text/xml)?
You can use any of the http proxy tools out there (Charles comes to
mind, but there's even addons for Firefox to
You are welcomed.
One thing I forgot: if you want to add an extra-level of robustness to
your POST handler, you can add a check for null entities (POST
'nothing') and throw new
ResourceException(Status.CLIENT_ERROR_BAD_REQUEST) for example (HTTP
400), when the entity you receive is null:
@Post
Hello Thierry,
you may want to have a look at this
http://blogs.sun.com/andreas/entry/no_more_unable_to_find
Enjoy your reading
On Tue, May 3, 2011 at 1:59 PM, Thierry Templier
thierry.templ...@noelios.com wrote:
Hello,
I try to access a site using HTTP from a Restlet application. Since the
Hello,
in your ServerResource:
getRequestAttributes().get(PARAM_NAME_HERE);
On Fri, Apr 29, 2011 at 4:07 AM, aquestion10
archana.suleb...@proximic.com wrote:
I have a simple html form with method = post and action=/myrestlet.The
form has name and description textfields. I would like to read
Till I figure out role stuff, I'm doing it myself, without relying on
Restlet APIs.
I have a base ServerResource class performing the security checks
against storage (JCR in my case, but the concept is the same,
applicable to any storage backend: DB, files, whatever), and all
guarded resources
Hello,
I'd like to know if there's some examples (and where are them, of
course) on using Tanuki's wrapper to 'control' (startup, shutdown) a
Restlet application.
I'm currently using a 'main' class which sets my Application instance,
starts needed services, and starts the Application, together
I don't know about explicit jars needed to support HTTPS (or SSL).
In the libs/readme.txt file of the Restlet distribution you can find
the dependencies list for all the distributed jars, plus the following
statement at the beginning of that file:
Below is a list of the dependencies between
Hello Daniele,
@Post(txt)
should accept strings. Test it though ;-)
On Tue, Mar 22, 2011 at 1:07 PM, Daniele Dellafiore ilde...@gmail.com wrote:
Hi.
I built a server resource with a
@Post
public void request(final String email) { }
that works great with the restlet client.
Hello Sandep,
for some of my representations I use FreeMarker as the template
engine. FreeMarker does automatic caching of the templates, probably
Velocity has a similar feature. In any way, what I do is to use a
single(ton) FreeMarkerUtils class that is the one loading the
templates, and the
Hello Jason,
If the URI template has the name 'identifier', why does your
ServerResource ask for 'name' instead?
String userId = (String)
getRequest().getAttributes().get(name);
That line should be:
String userId = (String) getRequest().getAttributes().get(identifier);
instead.
Hello Hetal,
you'd rather use two different resource classes here, because usually,
in RESTful design, a collection of X is a different resource than
X itself.
So in your example, you can have the following resources/URI
templates/server resource classes:
A car: /cars/{car}, CarServerResource
A
Hello Thierry,
thanks a lot for your (as usual) prompt and accurate answer.
I guess I can live with this small nuance until 2.1 is rock-solid and
ready to become the new stable branch.
My pleasure to be of help.
a bientot.
On Wed, Feb 9, 2011 at 8:40 AM, Thierry Boileau
Hello there,
I'm using Restlet 2.0.4 JSE, and am trying to modify my application
routes dynamically, according to the presence or not of classes in the
classpath (if an extension class is present, then I need that class to
handle a given route, instead of the 'base' class). While on this
quest,
Good to hear that :-) Good luck with the rest of your project Randy!
On Wed, Feb 2, 2011 at 3:30 PM, Randy Paries rtpar...@gmail.com wrote:
Fabian
thanks alot for all your help
I now have that working.
--
Fabián Mandelbaum
IS Engineer
Hello Randy. Even with HTTP Basic auth the provided credentials
(user+pass) are encoded. They are not transmitted like this on the
wire:
user=the_user
password=the_password
but, rather, like this, in a standard HTTP header:
Authorization Basic YWRtaW5AY2FsZW5jby5jb206MTExMTEx
That YW...MTEx
Hello Randy,
you usually know the hash function to encrypt the secret to persist in
encrypted in the DB.
So, you just need to get the secret from the request, apply that
hash/encryption function, and compare it with the already encrypted
value you read from the DB, in the Verifier's verify()
Hello Randy,
indeed your custom Verifier will have to query the DB on each request
to, well, verify, the provided credentials are valid. You can also
build an in-memory (provided the passwords are stored on the DB
already encrypted, to tighten security a bit) credentials 'cache'
which is
Hello Randy,
'login' is always a hot topic on RESTful applications.
The Restlet flow you mention is basically this:
Client --- Request -- Guard -- Protected Server Resource
it's the Guard (usually org.restlet.security.ChallengeAuthenticator)
the one that authenticates the user, making sure the
You are welcomed Anthony. Here you have some 'general' singleton
coding that works 'everywhere' in Java:
public class MySingleton {
private static class MySingletonHolder {
private static final MySingleton INSTANCE = new MySingleton();
}
private MySingleton() {
// You'll do all
Hello Anthony,
I use a single(ton) SessionManager of sorts which 'serves' the
connections when asked, something like:
DBSessionManager.getInstance().getSessionRO();
DBSessionManager.getInstance().getSessionRW();
and of course, the corresponding:
Hello, the post did come twice :-)
It's possible that if you print stuff (read: use the stream) from the
representation you get in the request body, for example for debug
purposes, you'll loose the representation itself (you've already
consumed it), so any method accessing it may return null.
You have to use URI templates for the routes, for example:
router.attach(/contact/{id}, ContactServerResource.class);
and in ContactServerResource you do something like this:
String contactID = (String)getRequestAttributes().get(id);
On Mon, Dec 20, 2010 at 1:32 AM, webp...@tigris.org wrote:
(or some other template
pattern / regex way of achieving the same thing). In general though,
we think that a resource should generally only have one canonical
path, and so serving it out at two similar paths is less desirable.
Hope this helps,
-Dave Fogel
On Thu, Dec 9, 2010 at 12:54 PM, Fabian
Hello Thierry,
I've just sent it to you in a private message.
Thank you.
On Tue, Dec 14, 2010 at 12:46 PM, Thierry Boileau
thierry.boil...@noelios.com wrote:
Hello Fabian,
could you send me your sample project, and log files?
best regards,
Thierry Boileau
similar paths is less desirable.
Hope this helps,
-Dave Fogel
On Thu, Dec 9, 2010 at 12:54 PM, Fabian Mandelbaum
fmandelb...@gmail.com wrote:
Hello there, sorry if this has been asked a zillion times (kindly
point me to the relevant answers if so) already.
Whenever a WebDAV request
Oh, one more I forgot:
Setup the tunnel service on your Application class for IE, like this
for example:
public class YourApplication extends Application {
public YourApplication() {
getTunnelService().setUserAgentTunnel(true); // To handle IE requests properly
}
}
2010/11/30 Fabián
Hello,
from time to time, and apparently at random, we get this exception
when performing a GET. All seems to work fine, but this is annoying
and worrysome, to say the least. In due time, we'll switch to Restlet
2.0.3, but this has been showing up since we've used 2.0.x with Jetty.
Any ideas?
Hello there,
We're currently facing a dillema with our REST application. Since we
sell accounts for this application, we'd need a way to limit the
concurrent number of users using an account. It happens that we sell
one account and have many users use the authentication credentials of
that
Hello Stephan, thanks for your answers, more questions between lines:
On Fri, Nov 19, 2010 at 2:13 PM, Stephan Koops stephan.ko...@web.de wrote:
Hi Fabian,
We thought about having the client send a cookie (I'm cookie-ignorant)
with each request, and have the resources check that cookie, which
Hello Nicho,
you can use Reference.decode(String) to get the proper value without
URL encoding chars in it.
On Thu, Oct 28, 2010 at 10:53 AM, webp...@tigris.org wrote:
I am trying to transfer a String with space character inside to server, but
server side can not retrieve it properly. for
Hello David,
why not packing all the FreeMarker templates inside a jar and deploy
that jar on your app's classpath?
You can then do something like this:
Configuration fmConfig = new Configuration();
fmConfig.setTemplateLoader(new ClassTemplateLoader(getClass(),
Hello KC,
for standard HTTP headers, take a look at
http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/324-restlet/130-restlet.html
for custom HTTP headers, you can use something like:
/**
* Set the value of a custom HTTP header
*
* @param header the custom HTTP header
Hello Shawn,
glad to hear it worked.
As for the explanation. Check the javadocs and the sources for the
TunnelService stuff while keeping in mind the explanation I gave on my
1st answer. You can think of this setting like an Restlet internal
rewriting of 'bad' HTTP headers for lazy/badly
IE (all versions from IE6 to IE8 IIRC, not 100% sure about IE6), send
the Accept: */* HTTP header, meaning basically that it will accept any
format for the representation of the resource (even if it's a WEB
browser, supposed to get mostly HTML pages). This sometimes triggers
'funny' or unexpected
Hello,
as for the Save as Dialog, you should do something like this:
Disposition attachment = new Disposition(Disposition.TYPE_ATTACHMENT);
attachment.setFilename(the file name here);
representation.setDisposition(attachment);
return representation;
This will set the proper HTTP headers so the
Hello Thierry,
sadly I have to refloat this bug on Restlet 2.0.1. I'm using Restlet
2.0.1 SE and PROPFIND is not handled anymore. I've switched libs back
to 2.0.0 ones (which have other problems, so I cannot use 'em as a
'fix') and PROPFIND is handled properly. I switch back to 2.0.1 libs
and
Hello,
you can use something like this, assuming a POST request:
@Post
@Override
public Representation post(Representation entity) throws ResourceException {
if (entity.isCompatible(new Variant(MediaType.APPLICATION_XML)) ||
entity.isCompatible(new Variant(MediaType.TEXT_XML))) {
final
Maybe this was triggered by the fix for my suggestion to actually
include the 'description (error message) in the HTML default
representation when ResourceException was thrown?
On Thu, Sep 9, 2010 at 11:24 AM, Tal Liron tal.li...@threecrickets.com wrote:
Just a quick note on changed behavior I
Hello Thierry,
Thanks for your answers. Is there a simple way on Restlet's side to
enforce us, lazy developers, to pass such params (actually a
Representation class) on annotated method handlers?
What happens if I use the signature you propose with DomRepresentation
as the entity parameter to
Hello list,
I have a ServerResource that checks parameters in
@Post/@Get/@WhateverMethod and does the following if required
parameters are not set:
throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, Required
parameter XXX is missing or empty);
This works fine, gives me the HTTP 400...
Bonsoir Thierry,
no problem for answering late, I know it's holidays time over there
(hope you enjoyed yours, if any).
I tried with the proposed change and PROPFIND is properly handled now, it works.
I've also added a debug log output like this (I had to use reqRep
instead of rep as the param
Hello Xavier,
yes, you can, there shouldn't be any problems with this, at least AFAIK.
On Tue, Aug 24, 2010 at 6:09 AM, Xavier M. xavier.meh...@gmail.com wrote:
Hello,
I would like to know if we can use a ClientResource call inside a server
resource, and if not, how to do this properly?
getClients().addProtocol(Protocol.HTTP) on the server side ...
thanks
regards
Xavier
2010/8/25 Fabian Mandelbaum fmandelb...@gmail.com
Hello Xavier,
yes, you can, there shouldn't be any problems with this, at least AFAIK.
On Tue, Aug 24, 2010 at 6:09 AM, Xavier M. xavier.meh...@gmail.com
wrote
Hello Thierry,
I've made two tests, one with the following signature:
@Propfind
public Representation propfind(Variant variant) throws ResourceException
It behaved like the original version, that is HTTP 405 (Method Not Allowed).
The following test was with the signature you proposed, and now
Hello Thierry,
the signature of the PROPFIND handler is this:
@Propfind
public Representation propfind() throws ResourceException
I don't remember if I've tried (I'll do it later and inform here) with
@Propfind
public Representation propfind(Variant variant) throws ResourceException
have to set the entity headers, also in HEAD.
best regards
Stephan
Fabian Mandelbaum schrieb:
Hello there,
why doesn't Reslet (at least as of V2.0RC4) have an @Head annotation
to handle HEAD requests?
Currently HEAD requests are being handled by GET handlers (at least
that's what's
Hello there,
why doesn't Reslet (at least as of V2.0RC4) have an @Head annotation
to handle HEAD requests?
Currently HEAD requests are being handled by GET handlers (at least
that's what's happening with my annotated resources). Why is this so?
Is there any reason why there's no @Head
Hello there,
You are not modelling your resources in a correct way. I see two
resources, minimum:
ContactsResource (the list of all contacts)
ContactResource (a given contact)
ContactsResource is the one that will call ContactDao's findAll()
ContactResource is the one that will call the other
Hello there, I'm using Restlet 2.0RC4 and I was wondering if to switch
from internal HTTP connector to Jetty I'd just have to copy all jars
inside the lib/org.eclipse.jetty_7.0 folder and the
org.restlet.jetty.jar into my classpath lib, et voilà !
Thanks in advance for your prompt answer
--
Hello Laurent,
yes, you did. Sorry for asking before reading... mea culpa on a
slow, raining, fall Monday morning in Buenos Aires ;-)
Thanks.
On Mon, Jun 14, 2010 at 9:50 AM, Laurent Rustuel
laurent.rust...@genesyslab.com wrote:
Hello,
Le 14/06/2010 14:23, Fabian Mandelbaum a écrit :
Hello
Hello everyone,
can I add WebDAV support? I've done some WebDAV work, and realized it
may not be so simple to generalize the thing enough to make it part of
Restlet. I'm willing to contribute my code, but it has lots of stuff
specific to my system.
Maybe we could work together on the
One such tool, which is made in Java, and it's not so expensive (USD
50 or so IIRC), is Charles Web Proxy.
http://www.charlesproxy.com/
There's also the HTTPFox addon for Firefox, which is good enough if
your client side is a web browser (which is not your case, but
anyway...)
I'm sure there's
Hello,
I think you can make a simple ContentResource handling the following patterns:
/{fileOrFolder}
/{folder}/{file}
which just tries to get those files (the ones coming out of the above
URI patterns) and: stream the file back if they are present, return
404 plus an empty representation or a
Hello Peg,
there is a way you can handle 'arbitrary' paths with a single rule
match... (that is, to handle the / inside the variable's values),
someone asked about this on this list not long ago IIRC...
You are welcomed. Good luck!
On Mon, May 10, 2010 at 10:01 AM, pegpeg gig...@yahoo.fr wrote:
Ditto.
On Tue, Apr 6, 2010 at 3:56 PM, TKM t...@jamfsoftware.com wrote:
The snapshot with the revised file upload works nicely on my system. thx for
the fix.
--
View this message in context:
Hello there, starting to break silence on my part a bit :-)
When can I expect a snapshot build with this fix?
Thanks in advance...
On Tue, Apr 6, 2010 at 6:21 AM, Thierry Boileau
thierry.boil...@noelios.com wrote:
Hello Carsten,
Thanks a lot for your report. The fix is available in the svn
Thanks a lot!
Testing my system with it :-)
On Tue, Apr 6, 2010 at 11:52 AM, Thierry Boileau
thierry.boil...@noelios.com wrote:
Hello Fabian,
after fixing some test cases, I've just updated the snapshot available from
the download page:
http://www.restlet.org/downloads/unstable
Best
Hello Bhallamudi,
For this magic to work, your client needs to include the HTTP header
Accept in its requests to this resource. For example:
GET /path/to/your/resource
Accept: text/xml
will invoke the method annotated with @Get(xml), while
GET /path/to/your/resource
Accept: application/json
Hello there,
I'm having some problems (Restlet 2.0snapshot from mid-February 2010)
with resource references encoding. Concretely, my app supports DAV
access to some resources, I'm currently testing with XXE (an XML
editor with a dav plugin) and with Microsoft XP's 'web folders'
(dav-enabled
Hello,
to download any file (not just audio), what I do is something along
the following lines (Restlet 2.0snapshot):
Representation getFile() throws Exception {
File theFileToDownload = retrieveFile(); // This can be a temp file,
a file gotten from the filesystem, from DB, ...
MediaType mt
Ah, forgot to tell: this code is on the server side. I don't use
Restlet for client-side code (yet ;))
2010/3/3 Fabián Mandelbaum fmandelb...@gmail.com:
Hello,
to download any file (not just audio), what I do is something along
the following lines (Restlet 2.0snapshot):
--
Fabián
Hello there,
one of the elements needed in a WebDAV response for the PROPFIND
method is the href (full URI) of the resource in question. For
example:
d:hrefhttp://host:port/path/to/the/resource/d:href
Now, if my Restlet application is 'behind' an URL redirect engine, for
example Apache's
Hello Thierry,
I've just found again the Mapping HTTP semantics page and was reading it :-)
The idea is to try to get the original host:port requested by the
client, and if the redirection engine is before the Restlet
application, the HTTP Host header for requests hitting the Restlet app
are
Hello there,
I've noticed (Restlet 2.0snapshot from 2010-02-19 IIRC) that there's
no @Head annotation to handle HEAD requests. The method annotated with
@Get is handling HEAD also. A priori this makes some sense because one
expects to get the same answer for HEAD and GET, except that HEAD has
Technologies ~ http://www.noelios.com
-Message d'origine-
De : Fabian Mandelbaum [mailto:fmandelb...@gmail.com]
Envoyé : samedi 16 janvier 2010 15:52
À : discuss@restlet.tigris.org
Objet : Re: handlePropfind() not being called when PROPFIND request is
received (to add WebDAV support
Bonjour Thierry !
I've got the snapshot, deployed it, and still got problems. Let me explain:
I get the HTML representation now, however there's a small catch. The
HTML page contains AJAX code that makes some requests in the
background to build parts of the page. One of such requests states
1 - 100 of 143 matches
Mail list logo