djangid / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

HttpClientFactory.createHttpClient() must produce AbstractHttpClient #342

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
>> Note that currently you need to supply an instance of AbstractHttpClient. 

                    RestAssured.config = newConfig().httpClient(httpClientConfig().httpClientFactory(
                            new HttpClientConfig.HttpClientFactory() {
                                @Override
                                public HttpClient createHttpClient() {
                                    return new NotReallyAnHttpClient();
                                }
                            }));

Is this ever going to be fixed? I have an impl of HttpClient that is not an 
AbstractHttpClient. The cast to AbstractHttpClient fails.

Original issue reported on code.google.com by sprag...@gmail.com on 9 Jul 2014 at 6:41

GoogleCodeExporter commented 8 years ago
I think It will require a massive rewrite. This is because http client has 
changed a lot in version 4.3 (I think). The HttpClientFactory API is prepared 
for the changed but I doubt that I'll find time to fix this in the near future. 
Feel free to help out if you like. Perhaps another couple of eyes would be good 
and hopefully find som trick to make it possible without a massive rewrite :)

Original comment by johan.ha...@gmail.com on 20 Jul 2014 at 5:57

GoogleCodeExporter commented 8 years ago
I have the same problem and currently I can work around it. 

But the classes used internally by RestAssured are already deprecreated in the 
current httpclient version. So possible that they are removed in upcoming 
releases which causes RestAssured users to stick to the old version and stick 
to old versions of other libraries that depend on httpclient (which are a lot).

Original comment by lbeus...@googlemail.com on 30 Jun 2015 at 10:00

GoogleCodeExporter commented 8 years ago
What do you mean by workaround it? How do you do that?

Original comment by johan.ha...@gmail.com on 30 Jun 2015 at 3:06