commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiaowei Jiang <>
Subject RE: [httpclient] [proposal] Remove the "httpclient/methods/Url*Me thod " classes
Date Thu, 08 Aug 2002 18:38:31 GMT
I completely agree with Jeff on this issue. These classes can be merged into
the other set of *Method classes. It won't create any backward compatibility
issue since it's never released. It will also make it clear to a first time
user on what they should use.


-----Original Message-----
From: Jeff Dever []
Sent: Thursday, August 08, 2002 11:02 AM
To: Jakarta Commons Developers List
Subject: [httpclient] [proposal] Remove the
"httpclient/methods/Url*Method " classes


Delete the 6 Url*Method classes and reimplement the functionality in a way
that makes sense.


The httpclient/methods package has the following classes:

Each *Method has a Url*Method wrapper.  I was not around when these were
added, but I think that these are a really bad idea.  I would guess that
they were to make up for the fact the the constructors for the *Method
classes would only take a path as a String, but sombody wanted to pass in a
full URL String, so wrappers for every *Method were created.

I would say that this was a bad design decision, for several reasons:

1) The behaviour that these classes represent could have been implemented
without change to the API.  The constructor of HttpMethodBase could have
been modified to allow either a path or a full Url to be passed in, and to
parse it appropriately.  Or another constructor that takes a URL object as a

2) The number of method classes has been multiplited by 2.  This sets up a
very bad pattern for future changes in an API and I would consider it
serious "API Bloat".

3) The Url*Methods are all broken: they take a String URL as a parameter,
but ignore the protocol, host and port.  All that is parsed out is the path
and querystring.  This is completely unexpected behaviour.

They were added in February this year and have never been included in a
tagged build.  Therefore there is no need to depricate them and they can be
removed according to the Commons Versioning guidelines.  I should stress
that now is the time to remove them, before the next 2.0 milestone, as they
will be more difficult to change afterwards (and they really don't work).

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message