hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Dever <jsde...@sympatico.ca>
Subject Re: [PATCH] PostMethod & PutMethod revision (take 3)
Date Sat, 01 Feb 2003 11:19:13 GMT
> I have almost started moving code of
>PostMethod.generateRequestBody(NameValuePair[]) to URIUtils class, but
>there's one point that made me reconsider. Currently URIUtils does not
>know any HttpClient specific classes and that sort of makes sense. I am
>not sure if we should make URIUtils be tightly coupled with
>NameValuePair class
Good point.  I think that is a goal of Sung-Gu.  But it makes it less 
useful if we can't pass in and get out fundamental objects of 
HttpClient.  Its too bad Java does not have a Pair class, such as the 
excellent pair template in the STL.

>>2) EntityEnclosingMethod
>>There is a useExpectHeader variable, with a setter and a getter, but it 
>>is not used for anything.
>Odi once expressed an opinion that there should be an option to disable
>sending of "Expect: 100-continue" header. In that vein addRequestHeaders
>method add the header only in case of useExpectHeader variable being
I get it.  Cool.

>All the changes you have made look fine to me. I only regret that you
>had to go through this laborious process for me. I have to say I have
>rather non-conventional coding style. I like tons of blanks everywhere.
>I like curly braces on a separate line. I am always in pains when I
>program for HttpClient as I have to adapt my coding style. Sometimes
>style violations do slip into my code 
>void doStuff( String param1, int param2 )
> try
> {
> }
> catch( Exception e )
> { 
> }
And I am of the type:

void doStuff(String param1, int param2)
 try {
 catch (Exception e) { 

But such is with coding style, everyone has their own variation.  There 
are such things as Jalopy that will reformat code so you can format in 
your own style and convert later.  While this was helpful, I spend more 
time looking at code than writing code, which made it harder to 
comprehend afterwards.  Come to think of it, it woulld be cool if the 
editor would show the code in your personal style and save it in the 
project style transparently ... or if code itself was in xml ... I 
wonder if there is a jakarta project for that ...


View raw message