Announcing an HTTP-RPC project

2019-08-27 Thread Vic Cekvenich
Using this lib, v5 of course.
Open source on github here:

- http://java-http-rpc.mbake.org

I had to add some libs to get mime to work.
Happy to answer any questions.
Vic

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



CORS in Core v5 beta

2019-08-26 Thread Vic Cekvenich
Hi,
3 questions:
How do I do: request.get('origin')?

Also is this best way to set CORS?
response.setHeader('Access-Control-Allow-Origin', origin)

And I assume set status 403 if I want to reject.

I know it is not a good example, but I do want to get the origin of the user.
And then do some computing and figure if I should allow the origin.
So I just want to know the right way to use the api.
Cheers, Vic
ps: ftw my code is here:
https://github.com/intuition-dev/intu-diversity/blob/master/java-workspace/java-srv-http-rpc%2B/src/org/hrp/http/HSrvHandler.java

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



where is client beta?

2017-12-26 Thread Vic Cekvenich
Hi,
Not in maven.
So I download from the website:
- https://hc.apache.org/httpcomponents-client-5.0.x/download.html

It contains core jar, and an H2 jar.
Is H2 the client?

tia,
Vic

-
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.4 GA released

2015-11-07 Thread Vic Cekvenich
I go to the web site and click download:
http://hc.apache.org/downloads.cgi


On Sat, Nov 7, 2015 at 4:55 PM, sebb  wrote:

> On 7 November 2015 at 17:32, Vic Cekvenich 
> wrote:
> > I can't see the download.
>
> Where were you looking?
>
> i.e. which mirror were you using, and which file are you trying to
> download?
>
> The download page tells you the mirror, for example:
>
> >>
> You are currently using http://apache.mirror.anlx.net/. If you
> encounter a problem with this mirror, please select another mirror.
> <<
>
> Sometimes mirrors take a while to pick up all the new files.
>
> > On Wed, Nov 4, 2015 at 12:52 AM, Oleg Kalnichevski 
> wrote:
> >
> >> The Apache HttpComponents project is pleased to announce 4.4.4 GA
> >> release of HttpComponents Core.
> >>
> >> This is a maintenance release that fixes a number of issues discovered
> >> since 4.4.3.
> >>
> >> Please note that as of 4.4 HttpCore requires Java 1.6 or newer.
> >>
> >> Download - <http://hc.apache.org/downloads.cgi>
> >> Release notes -
> >> <http://www.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES.txt>
> >> HttpComponents site - <http://hc.apache.org/>
> >>
> >> About HttpComponents Core
> >>
> >> HttpCore is a set of low level HTTP transport components that can be
> >> used to build custom client and server side HTTP services with a minimal
> >> footprint. HttpCore supports two I/O models: a blocking I/O model based
> >> on the classic Java I/O and a non-blocking, event driven I/O model based
> >> on Java NIO.
> >>
> >>
> >>
> >> -
> >> 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.4 GA released

2015-11-07 Thread Vic Cekvenich
I can't see the download.

On Wed, Nov 4, 2015 at 12:52 AM, Oleg Kalnichevski  wrote:

> The Apache HttpComponents project is pleased to announce 4.4.4 GA
> release of HttpComponents Core.
>
> This is a maintenance release that fixes a number of issues discovered
> since 4.4.3.
>
> Please note that as of 4.4 HttpCore requires Java 1.6 or newer.
>
> Download - 
> Release notes -
> 
> HttpComponents site - 
>
> About HttpComponents Core
>
> HttpCore is a set of low level HTTP transport components that can be
> used to build custom client and server side HTTP services with a minimal
> footprint. HttpCore supports two I/O models: a blocking I/O model based
> on the classic Java I/O and a non-blocking, event driven I/O model based
> on Java NIO.
>
>
>
> -
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
>
>


issue 1610

2015-10-11 Thread Vic Cekvenich
hi.
This issue as per comments (and what I see in 4.5.1)
seems not solved.
https://issues.apache.org/jira/browse/HTTPCLIENT-1610

Help?
Vic
ps: the release notes link is borked


Pooling constructor

2015-10-11 Thread Vic Cekvenich
Hi,
Looking at
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html

it seems that
 new PoolingHttpClientConnectionManager(1,TimeUnit.MINUTE);
will close connection in that time (to refresh it)
and
setValidateAfterInactivity(1);
will check stale.

Is this correct?
Or are they both stale checks?

Vic


Re: Am I doing this right: PoolingHttpClientConnectionManager

2015-10-11 Thread Vic Cekvenich
Hi Oleg, Thx.
Is there a way to manually mark a connection as 'stale' or anything such

This would force use of another connection in the pool or establishing a
new one.
Vic


On Sun, Oct 11, 2015 at 1:46 AM, Oleg Kalnichevski  wrote:

> On Sat, 2015-10-10 at 17:21 -0700, Vic Cekvenich wrote:
> > Hi, we have heavy load, am I using the pool right:
> >
> > 1. I make a call using a client and in finally I consume but * don't *
> call
> > close() - since I want conn returned to the pool.
> >
>
> You really _should_ close the response from a try-finally or
> try-with-resources
>
> > 2. In HttpRequestRetryHandler retryRequest, once it retries 10 times, I
> do
> > close the conn - since it should be removed from the pool as likely bad.
> >
>
> HttpClient automatically closes and evicts faulty connections.
>
> > HttpClientContext ctx = (HttpClientContext) context;
> > HttpClientConnection conn = (HttpClientConnection) ctx.getConnection();
> > conn.close();
> > This I do since I get many close max tries errors and other error
> responses
> > from the end point
> >
> > I get socket closed errors.
> >
> > What should I do in retryRequest after 20 errors to reduce further
> errors?
> >
>
> Return false.
>
> Oleg
>
>
> -
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
>
>


Am I doing this right: PoolingHttpClientConnectionManager

2015-10-10 Thread Vic Cekvenich
Hi, we have heavy load, am I using the pool right:

1. I make a call using a client and in finally I consume but * don't * call
close() - since I want conn returned to the pool.

2. In HttpRequestRetryHandler retryRequest, once it retries 10 times, I do
close the conn - since it should be removed from the pool as likely bad.

HttpClientContext ctx = (HttpClientContext) context;
HttpClientConnection conn = (HttpClientConnection) ctx.getConnection();
conn.close();
This I do since I get many close max tries errors and other error responses
from the end point

I get socket closed errors.

What should I do in retryRequest after 20 errors to reduce further errors?

Help?
Vic


Am I doing this right: PoolingHttpClientConnectionManager

2015-10-10 Thread Vic Cekvenich
Hi, we have heavy load, am I using the pool right:

1. I make a call using a client and in finally I consume but * don't * call
close() - since I want conn returned to the pool.

2. In HttpRequestRetryHandler retryRequest, once it retries 10 times, I do
close the conn - since it should be removed from the pool as likely bad.

HttpClientContext ctx = (HttpClientContext) context;
HttpClientConnection conn = (HttpClientConnection) ctx.getConnection();
conn.close();
This I do since I get many close max tries errors and other error responses
from the end point

I get socket closed errors.

What should I do in retryRequest after 10 errors to reduce further errors?

Help?
Vic