You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2021/06/13 09:55:00 UTC

[jira] [Comment Edited] (HTTPCORE-680) ClassicRequestBuilder does not accept a RequestConfig

    [ https://issues.apache.org/jira/browse/HTTPCORE-680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17362487#comment-17362487 ] 

Oleg Kalnichevski edited comment on HTTPCORE-680 at 6/13/21, 9:54 AM:
----------------------------------------------------------------------

[~slisaasquatch] HttpGet, HttpPost, etc are not deprecated. I imagine there are enough people who want to continue using them. Message builders just provide an alternative for those who prefer more fluent APIs.

I have looked into making message classes immutable by default during the 4.0 and 5.0 development phases and always found it making a number of things more difficult (message processing though a chain of message interceptors, for instance) and producing few benefits. Generally, HTTP messages should be digested into higher level objects (which may well be immutable) and immediately disposed of or forwarded further to the next hop (likely with hop specific modifications).

Oleg


was (Author: olegk):
[~slisaasquatch] HttpGet, HttpPost, etc are not deprecated. I imagine there are enough people who want to continue using them. Message builders just provide an alternative for those who prefer more fluent APIs.

I have looked into making message classes immutable by default during the 4.0 and 5.0 development phases and always found it making a number of things more difficult (message processing though a chain of message interceptors, for instance) and producing few benefits. Generally, HTTP messages should be digested into a higher level object (which may well be immutable) and immediately disposed of.   

Oleg

> ClassicRequestBuilder does not accept a RequestConfig
> -----------------------------------------------------
>
>                 Key: HTTPCORE-680
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-680
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 5.1
>            Reporter: Siqi Li
>            Priority: Minor
>
> Since 5.1 the new request builder classes seem to be the recommended way of creating http requests, if I'm not mistaken. The original SimpleHttpRequests class is now straight up deprecated. However, unlike SimpleRequestBuilder, the new ClassicRequestBuilder does not accept a RequestConfig. To make matters worse, the request class it produces is BasicClassicHttpRequest, which does not accept a RequestConfig either. This basically renders the ClassicRequestBuilder class useless in a lot of situations.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org