users@jersey.java.net

Re: [Jersey] Re: getting the allowed methods from the apache http client api

From: Arulazi Dhesiaseelan <aruld.info_at_gmail.com>
Date: Tue, 24 Mar 2009 08:03:52 -0600

Hi Paul,

Added the patch to the issue:
https://jersey.dev.java.net/issues/show_bug.cgi?id=251

Thanks!
Arul

On Tue, Mar 24, 2009 at 2:50 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

> Hi Arul,
> Great. Can you please create an issue and add an attachment. That way
> things are much easier to find for review and commit of the patch. Plus
> there is better recognition for you as the submitter of the patch.
>
> Thanks,
> Paul.
>
> On Mar 24, 2009, at 4:01 AM, Arul D wrote:
>
> Hi Paul,
>
> Please find the attached patch for this improvement. Here are the changes I
> made to ClientResponse as we discussed in your earlier response:
>
> 1. added API: List<String> getAllow()
> 2. deprecated API: MultivaluedMap<String, String> getMetadata() =>
> MultivaluedMap<String, String> getHeaders()
>
> I haven't refactored the current code to use getHeaders().
>
> I am not sure if I need to create an issue for this. Let me know.
>
> Best regards,
> Arul
>
> On Mon, Mar 23, 2009 at 8:51 PM, Arul D <aruld.info_at_gmail.com> wrote:
>
>> On Mar 23, 2009, at 3:35 PM, Arul Dhesiaseelan wrote:
>>
>> > Paul Sandoz wrote:
>> >>
>> >> On Mar 20, 2009, at 5:26 PM, Arul Dhesiaseelan wrote:
>> >>
>> >>> I am trying to invoke OPTIONS method on the ApacheHttpClient API
>> >>> and I am getting the ClientResponse with all the allowedMethods,
>> >>> but there is no API to get the supported methods from
>> >>> HttpClientResponse in ApacheHttpClientHandler.
>> >>> Is there a way to get the list of allowed methods from the
>> >>> ClientResponse?
>> >>>
>> >>
>> >> You can get the "Allow" HTTP header directly and parse it yourself.
>> >>
>> >> ClientResponse cr = ...
>> >> String allow = cr.getMetadata().getFirst("Allow");
>> >>
>> >> I think we should deprecate getMetadata and have getHeaders instead.
>> >>
>> >> I suppose we could have something like:
>> >>
>> >> List<String> getAllow();
>> >>
>> >> on ClientResponse? Is that what you want?
>> >>
>> >> Paul.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2521612&i=0>
>> >> For additional commands, e-mail: users-help@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2521612&i=1>
>> >>
>> >>
>> > Thanks Paul. That should work for me.
>> >
>> > It would be nice to have an API instead of manual parsing. Let me
>> > know if you want me to submit a patch for this.
>> >
>>
>> Please, many thanks,
>> Paul.
>
>
> <allow_api.patch>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>


-- 
http://aruld.info