Am 2020-01-18 um 19:05 schrieb Gary Gregory:
I think the idea behind the HttpRequests enum is that it defines a specific
set of supported values.
If we want to allow users to extend this set of values, then the enum could
implement an interface and we would code to the interface as opposed to the
enum internally.
I suppose this all depends on how we want to represent 'we support RFC N
and that RFC defines HTTP verbs A, B, and C'...
I would not make it too complex and academic. A public final class makes
pretty clear that we are in control of this class and provide it as
courtesy. Anything else more sophisticated can implemented by the user
or donated.
It really looks like an enum abuse for fluent builders.
Gary, are you OK making them "public final classes"?
M
On Sat, Jan 18, 2020 at 11:48 AM Oleg Kalnichevski <[email protected]> wrote:
On Sat, 2020-01-18 at 16:17 +0100, Michael Osipov wrote:
Am 2020-01-18 um 11:02 schrieb Oleg Kalnichevski:
On Wed, 2020-01-15 at 22:39 +0100, Michael Osipov wrote:
Am 2020-01-15 um 18:24 schrieb Oleg Kalnichevski:
On Wed, 2020-01-15 at 17:36 +0100, Michael Osipov wrote:
On Mon, 2020-01-13 at 20:20 +0100, Michael Osipov wrote:
Am 2020-01-13 um 15:00 schrieb Oleg Kalnichevski:
Michael, Gary
How long do you intend to block HttpClient 5.0-beta7
release?
Are you done with all this renaming and enum stuff?
One remaining PR and I am done. Will merge tonight.
Michael
Is there anything left blocking the release?
No! I have merged immediately after my email.
Go ahead.
OK. And what about HttpRequests, SimpleHttpRequests and
ClassicHttpRequests?
I will have a look at them tomorrow.
Hi Michael
Any update?
Wen't through the enums. First of all, I think HttpRequests should
be
BasicHttpRequests to be consistent with the rest.
As it looks like to me these are basic builders/factories. Enum has
been
used (to forbid inheritance?). In my opinion this is not what enum
is
for. I would expect them to be like:
public final class BasicHttpRequests {
public BasicHttpRequests delete(String) ...
public BasicHttpRequests delete(URI) ...
public BasicHttpRequests delete(HttpHost, String) ...
// and so on
}
A bit similar to the HTTP method operations in
org.springframework.web.client.RestTemplate, but w/o the execution.
If that sounds reasonable, I will provide a PR today for all three of
them.
Michael
I personally do not have an opinion strong enough and will just stay
away.
If my memory still serves me the first of such classes was contributed
by Gary and I modeled similar classes based on the first one.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]