A single flow for all outgoing HTTP requests#729
A single flow for all outgoing HTTP requests#729tareksha wants to merge 1 commit intocodenvy-legacy:3.xfrom
Conversation
|
@skabashnyuk @evoevodin please review |
| private java.io.File deployDirectory; | ||
|
|
||
| @Inject | ||
| private DownloadPlugin theDownloadPlugin; |
There was a problem hiding this comment.
Can you explain why we still need old field, looks like it is unused.
There was a problem hiding this comment.
@garagatyi the old field is final protected, not private. i saw it too risky to just remove it or hide non-incrementally.
There was a problem hiding this comment.
I didn't notice that, thanks.
|
@garagatyi the change now uses the same builder pattern. please review |
10d17fa to
f385a76
Compare
|
@tareqhs Quick response is -1 to make HttpJsonRequest something not related to json. We understand that you want to make some tooling to make general request but making it in HttpJsonRequest is not that we want to achieve. I hope @garagatyi @evoevodin can add more to this statement. |
|
Hi @tareqhs.
The idea of you changes is clear for me and makes total sense, but the implementation strategy should be different, as As for me the best solution here is to create general class like |
|
hi @evoevodin @skabashnyuk , Well, that was the original approach in the PR but I tried to minimize code changes. The main issue is not whether to extend This is my suggestion : Agree? |
phase 1 - builder, runner, all json requests A new builder inteface HttpRequest, sharing features with the existing HttpJsonRequest, allows building general requests and consuming responses through HttpResponse. A single HTTP flow is achieving by sharing a single concrete HTTP request execution method. Signed-off-by: Tareq Sharafy <tareq.sha@gmail.com> Change-Id: I2f334b7bb133b3f136d2b8e5b18301602f427355
f385a76 to
5ad5e27
Compare
phase 1 - builder, runner, all json requests
An injected interface, HttpRequestFactory, allows managing all outgoing
HTTP requests. HttpJsonRequest factory should use it internally. The
defult DefaultHttpJsonRequest as reusable as it accepts the general HTTP
factory in its constructor. Extensions can replace HttpJsonRequestFactory
and provide DefaultHttpJsonRequest as-is, given a different impl.
Signed-off-by: Tareq Sharafy tareq.sha@gmail.com
Change-Id: I2f334b7bb133b3f136d2b8e5b18301602f427355