vert-x3 / issues

Apache License 2.0
37 stars 7 forks source link

Closed check on http requests #162

Open pconway11 opened 8 years ago

pconway11 commented 8 years ago

It would be useful to have a closed check on http requests .

This is available on responses but not on requests

io.vertx.core.http.HttpServerResponse provides boolean closed();

but io.vertx.core.http.HttpClientRequest does not provide the check

in the implementation of the request there is a check complete method which throws an exception if you try and end an already complete request

protected void checkComplete() { if(this.completed) { throw new IllegalStateException("Request already complete"); } }

It would be nice to expose access to this boolean to avoid these exceptions

vietj commented 8 years ago

@pconway11 there is now HttpClientRequest.connection(), how about adding closed() boolean here ?