Hi
On Tue, Mar 19, 2013 at 11:29 PM, Danny Ayers <[email protected]> wrote:
> The approach makes sense, but I've just hit what appears to be a bug
> in how the serializer is chosen -
>
> curl --user admin:admin -H "Content-Type: text/turtle"
> http://localhost:8080/user-management/users/anonymous
>
You need to set the Accept header and not the Content-Type header in
the request. The Content-Type header defines the type of the data sent
in the request (applies only to POST, PUT requests). The Accept header
determines the content type of the data the server sends back to you.
When using
curl --user admin:admin -H "Accept: text/turtle" \
http://localhost:8080/user-management/users/anonymous
you should get the response serialized as Turtle
best
Rupert
> returns RDF/JSON instead of Turtle
>
> this is calling against:
>
> @GET
> @Path("users/{username}")
> public TripleCollection getUserContext(@PathParam("username")
> String userName)
> throws UnsupportedEncodingException {
> return getUser(userName).getNodeContext();
> }
>
> I'm not 100% sure, my build isn't totally fresh from svn (I've just
> updated, waiting for the install as I type...), but it's easy enough
> to check with the curl line above.
>
> Where is the magic that turns that TripleCollection into a Response?
>
> (This isn't a blocker for me, I can put in temporary forced-turtle
> methods for now).
>
> Cheers,
> Danny.
>
>
>
> --
> http://dannyayers.com
>
> http://webbeep.it - text to tones and back again
--
| Rupert Westenthaler [email protected]
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen