|
You don't need to put a media type if you're using void (although, you could potentially have more than one @Post handler, for several media types, to be used depending on the expectation of a media type from the client...).
But,
you do need to disable conditional mode: @Post
public void handlePost(Representation rep) { ... }
@Override
Why? I'm still a bit in the dark about this. My current instinct tells me that there's a bug in how the preferred variant is calculated for conditional mode, in that it doesn't gather variants for the particular method. Thus, I suspect (I haven't tested this) that if you had a @Get with a particular media type (say, @Get("txt")) then there would be a preferred variant and your @Post would be called, even in conditional mode.
Please take that last paragraph with a truckload of salt. :)
-Tal
Hi Tal- |
- ServerResource conditional mode Tal Liron
- Re: ServerResource conditional mode David Fogel
- Re: ServerResource conditional mode Tal Liron
- Re: ServerResource conditional mode David Fogel
- Re: ServerResource conditional mode Tal Liron
- RE: ServerResource conditional mode Jerome Louvel
- Re: ServerResource conditional mo... Tal Liron
- RE: ServerResource conditiona... Jerome Louvel
- Re: ServerResource conditiona... Tal Liron
- RE: ServerResource conditiona... Jerome Louvel
- Re: ServerResource conditiona... Tal Liron
- Re: ServerResource conditiona... David Bordoley
- Re: ServerResource conditiona... David Fogel
- RE: ServerResource conditiona... Jerome Louvel
- RE: ServerResource conditional mode Jerome Louvel

