Re: [ANNOUNCEMENT] HttpComponents Core 4.4 GA released

2014-12-19 Thread Oleg Kalnichevski
On Thu, 2014-12-18 at 20:12 -0700, Shawn Heisey wrote:
 On 12/18/2014 1:41 AM, Oleg Kalnichevski wrote:
  The Apache HttpComponents project is pleased to announce 4.4 GA release
  of HttpComponents Core. 
 
 I'm trying to upgrade the Lucene-Solr codebase to use HC 4.4, but ivy
 can't find it.  It's missing from the maven repo that ivy tried to use
 for downloading:
 
 http://uk.maven.org/maven2/org/apache/httpcomponents/httpclient/
 
 When do you think the maven repo will have the new version, so that ivy
 can find it?
 
 Thanks,
 Shawn
 

Shawn

It is a GA release of core components HttpClient is based up. HttpClient
4.4 GA is not ready yet.

Oleg



-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Re: How to get the parameters from HttpRequest?

2014-12-19 Thread Oleg Kalnichevski
On Thu, 2014-12-18 at 17:59 +0100, Johan Hertz wrote:
 Hi,
 
 I am creating a class that implements the interface HttpRequestHandler.  
 The handle method has a parameter of type HttpRequest on which I would 
 expect to find the payload/parameters sent to the server. It does have a 
 getParams method but it is deprecated. The deprecated message is /use 
 configuration classes provided 'org.apache.http.config' and 
 'org.apache.http.client.config///.
 
 Looking at this classes I can't seem to find what I am after, anyone 
 know where I should look?
 
 Regards
 Johan
 

Johan

URIBuilder [1] and URLEncodedUtils [2] from HttpClient should do the
trick. You can use URIBuilder to manipulate request URIs and extract
request query parameters. URLEncodedUtils can be used to parse request
entity to extract form parameters. 

Hope this helps.

Oleg 

[1]
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
[2]
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URLEncodedUtils.html


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Re: How to get the parameters from HttpRequest?

2014-12-19 Thread Johan Hertz

On 2014-12-19 14:47, Oleg Kalnichevski wrote:

On Thu, 2014-12-18 at 17:59 +0100, Johan Hertz wrote:

Hi,

I am creating a class that implements the interface HttpRequestHandler.
The handle method has a parameter of type HttpRequest on which I would
expect to find the payload/parameters sent to the server. It does have a
getParams method but it is deprecated. The deprecated message is /use
configuration classes provided 'org.apache.http.config' and
'org.apache.http.client.config///.

Looking at this classes I can't seem to find what I am after, anyone
know where I should look?

Regards
Johan


Johan

URIBuilder [1] and URLEncodedUtils [2] from HttpClient should do the
trick. You can use URIBuilder to manipulate request URIs and extract
request query parameters. URLEncodedUtils can be used to parse request
entity to extract form parameters.

Hope this helps.

Oleg

[1]
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
[2]
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URLEncodedUtils.html


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org


Hi,

Thanks for replying.

I am doing this on the server side so I don't know if the solution you 
suggested applies? But what I found was that the request was of type 
HttpEntityEnclosingRequest. So I just cast to that and then get the 
payload data using entityRequest.getEntity() and then read the data from 
the input stream returned by entity.getContent().


Regards
Johan


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Re: How to get the parameters from HttpRequest?

2014-12-19 Thread Oleg Kalnichevski
On Fri, 2014-12-19 at 14:55 +0100, Johan Hertz wrote:
 On 2014-12-19 14:47, Oleg Kalnichevski wrote:
  On Thu, 2014-12-18 at 17:59 +0100, Johan Hertz wrote:
  Hi,
 
  I am creating a class that implements the interface HttpRequestHandler.
  The handle method has a parameter of type HttpRequest on which I would
  expect to find the payload/parameters sent to the server. It does have a
  getParams method but it is deprecated. The deprecated message is /use
  configuration classes provided 'org.apache.http.config' and
  'org.apache.http.client.config///.
 
  Looking at this classes I can't seem to find what I am after, anyone
  know where I should look?
 
  Regards
  Johan
 
  Johan
 
  URIBuilder [1] and URLEncodedUtils [2] from HttpClient should do the
  trick. You can use URIBuilder to manipulate request URIs and extract
  request query parameters. URLEncodedUtils can be used to parse request
  entity to extract form parameters.
 
  Hope this helps.
 
  Oleg
 
  [1]
  http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
  [2]
  http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URLEncodedUtils.html
 
 
  -
  To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
  For additional commands, e-mail: httpclient-users-h...@hc.apache.org
 
 Hi,
 
 Thanks for replying.
 
 I am doing this on the server side so I don't know if the solution you 
 suggested applies? 

Why would that matter? URI and HttpEntity instances are absolutely the
same. 

 But what I found was that the request was of type 
 HttpEntityEnclosingRequest. So I just cast to that and then get the 
 payload data using entityRequest.getEntity() and then read the data from 
 the input stream returned by entity.getContent().
 

You could use URLEncodedUtils#parse(HttpEntity) to digest this entity to
a list of name/value pairs, but reading directly from the content stream
is perfectly reasonable, too.

Oleg 



-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Re: [ANNOUNCEMENT] HttpComponents Core 4.4 GA released

2014-12-19 Thread Shawn Heisey
On 12/19/2014 6:39 AM, Oleg Kalnichevski wrote:
 It is a GA release of core components HttpClient is based up. HttpClient
 4.4 GA is not ready yet.

Got it.  Missed that little detail.

Thanks,
Shawn


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org