Re: HttpClient API usage feedback/questions

2018-06-09 Thread Jaikiran Pai
Hi Chris, On 06/06/18 5:04 PM, Chris Hegarty wrote: Jaikiran, 3. Is the latest API javadoc this one[2]? Based on what I read and experimented so far, I don't see a way to set a value for User-Agent at the HttpClient level. Unless of course, I'm expected to keep setting it on each request th

Re: HttpClient API usage feedback/questions

2018-06-06 Thread James Roper
On Wed, 6 Jun 2018 at 21:03, Chris Hegarty wrote: > > > On 4 Jun 2018, at 03:48, James Roper wrote: > > > > ... > > > > +1 on variants of getContentType that give you either the media type or > the charset parsed from the content type header. Without them, we're going > to end up with a lot of r

Re: HttpClient API usage feedback/questions

2018-06-06 Thread Chris Hegarty
Jaikiran, > On 2 Jun 2018, at 07:22, Jaikiran Pai wrote: > > Hello, > > I've been experimenting with the new HttpClient API that's part of Java now. > I am using the latest EA build 16 of Java 11 from here[1]. I'm still in the > early stages of integrating this into one of the libraries where

Re: HttpClient API usage feedback/questions

2018-06-06 Thread Chris Hegarty
> On 4 Jun 2018, at 03:48, James Roper wrote: > > ... > > +1 on variants of getContentType that give you either the media type or the > charset parsed from the content type header. Without them, we're going to end > up with a lot of regexps doing ad hoc parsing to get the information needed

Re: HttpClient API usage feedback/questions

2018-06-03 Thread James Roper
On Sat, 2 Jun 2018 at 16:52, Jaikiran Pai wrote: > 2. Would it be a good idea to add APIs (perhaps in HttpHeaders class) to > return values of higher level constructs represented by the headers. > Imagine certain well-known headers in the response, like Content-Length > and Content-Type. Would it

Re: HttpClient API usage feedback/questions

2018-06-02 Thread Jaikiran Pai
You are right. That didn't occur to me. So yes, clearly, adding those 2 new methods won't add value. -Jaikiran On Sunday, June 3, 2018, Pavel Rappo wrote: > >> On 2 Jun 2018, at 07:22, Jaikiran Pai wrote: >> >> Some of the places where we parse the (response) headers, we check for the presence

Re: HttpClient API usage feedback/questions

2018-06-02 Thread Pavel Rappo
> On 2 Jun 2018, at 07:22, Jaikiran Pai wrote: > > Some of the places where we parse the (response) headers, we check for the > presence of some headers and if not present then we default them to certain > values (based on certain application specific context). In its current form > of the H