Hard to say without knowing what you are doing :)
Using ObjectRepresentation for a String is strange if that is your
usecase as it is meant for a serializable Java object.
If you are just wanting to pass plain text then you should use the
following:
if (variant.getMediaType().equals(MediaType
request.getClientInfo().getAcceptedMediaTypes().add(new
Preference(MediaType.APPLICATION_JAVA_OBJECT));
I only used the new ClientInfo() before in order to make sure it was the
only MediaType.
If you still have a problem try seeing what other mediatypes are in the
"request.getClientInfo().ge
Should I even be using object?
Stanczak Group wrote:
So how do I use 1.0 to get objects?
Jonathan Hall wrote:
Ah, I am running from http://www.restlet.org/downloads/archives/1.1/
Jerome wrote:
"Now that the 1.0 code base seems to be quite stable it is time to
move forward. We have just creat
So how do I use 1.0 to get objects?
Jonathan Hall wrote:
Ah, I am running from http://www.restlet.org/downloads/archives/1.1/
Jerome wrote:
"Now that the 1.0 code base seems to be quite stable it is time to
move forward. We have just created a maintenance branch for 1.0 in SVN.
From now on, th
Did did see a Representation in the Request constructor. Is that what I
should use. I'll try that.
Stanczak Group wrote:
I don't have a request.setClientInfo() in my request object. Do I have
an older version? I'm using 1.0.4.
Jonathan Hall wrote:
Whoops,
clientInfo.setAcceptedMediaTypes(ne
Ah, I am running from http://www.restlet.org/downloads/archives/1.1/
Jerome wrote:
"Now that the 1.0 code base seems to be quite stable it is time to move
forward. We have just created a maintenance branch for 1.0 in SVN.
From now on, the SVN trunk will be dedicated to the upcoming version 1.1.
I don't have a request.setClientInfo() in my request object. Do I have
an older version? I'm using 1.0.4.
Jonathan Hall wrote:
Whoops,
clientInfo.setAcceptedMediaTypes(new
ArrayList>().);
should be:
clientInfo.setAcceptedMediaTypes(new ArrayList>());
Jonathan Hall wrote:
Hi,
try something
I have both matching variants. Both client and server use Java Object.
But the client is requesting plain text.
Thierry Boileau wrote:
Hi,
the subject of this issue seems to be the content negociation
algorithm. On one side, the client lists all media types he knows or
is able to manage (the
Hi,
the subject of this issue seems to be the content negociation algorithm.
On one side, the client lists all media types he knows or is able to
manage (the accepted media types).
On the other side, the server is able to serve several representations
of the same resource.
The aim of the conte
On 8/18/07, Jerome Louvel <[EMAIL PROTECTED]> wrote:
>
> Alex,
>
> > > The "serverAddress" property indeed does comparisons based on the
> > > numerical IP address. There are some convenience static methods on
> > > VirtualHost:
> > > - getLocalHostAddress()
> > > - getIpAddress(String domain)
>
> If you have time to help with the RFE, maybe by providing a patch, it could
> still go into the upcoming 1.1 release :)
I posted a fairly non-invasive patch and additional class to the RFE. I'm sure
you could improve upon it.
http://restlet.tigris.org/issues/show_bug.cgi?id=157
It adds a
Whoops,
clientInfo.setAcceptedMediaTypes(new ArrayList>().);
should be:
clientInfo.setAcceptedMediaTypes(new ArrayList>());
Jonathan Hall wrote:
Hi,
try something like:
ClientInfo clientInfo = new ClientInfo();
clientInfo.setAcceptedMediaTypes(new
ArrayList>().);
clientInfo.getAcceptedMed
Hi,
try something like:
ClientInfo clientInfo = new ClientInfo();
clientInfo.setAcceptedMediaTypes(new ArrayList>().);
clientInfo.getAcceptedMediaTypes().add(new
Preference(MediaType.APPLICATION_JAVA_OBJECT));
request.setClientInfo(clientInfo);
jon
Stanczak Group wrote:
Here's the code:
Req
Here's the code:
Request request = new Request(Method.GET,
"http://localhost:8182/users/dog";);
ChallengeResponse authentication = new
ChallengeResponse(ChallengeScheme.HTTP_BASIC, "admin", "admin");
request.setChallengeResponse(authentication);
Client client = new Client(
Jim Edwards-Hewitt surety.com> writes:
>
> In addition to standard access log messages, I'm getting a message from
> afterHandle on every access:
>
> Jun 8, 2007 4:12:26 PM com.noelios.restlet.LogFilter afterHandle
>
> This doesn't really provide any useful information for my application. I
Hi Pete,
Welcome! The answer is to use request.getEntityAsForm(), then check
the Form class for access methods.
Best regards,
Jerome
2007/8/21, Pete <[EMAIL PROTECTED]>:
> in the handlePost method of my resource class, request.getEntity().getText()
> returns me a query string like a=b&c=d&e=f e
16 matches
Mail list logo