Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom SchemeRegistry for created HttpClient in AsyncHttpClient #253

Closed
Diederikjh opened this issue Jun 25, 2013 · 1 comment
Closed

Custom SchemeRegistry for created HttpClient in AsyncHttpClient #253

Diederikjh opened this issue Jun 25, 2013 · 1 comment
Assignees
Milestone

Comments

@Diederikjh
Copy link

This project looks good, and it is very close to what we need in our project.

One thing that is a potential snag is the inability to set a custom SchemeRegistry when creating a new instance of AsyncHttpClient. (Our project must have a custom SocketFactory for https as our QA servers use self signed certificates.) Since the SchemeRegistry can't be set on a HttpClient after creating it, getting a reference to the HttpClient won't help either.

I would suggest adding another constructor to AsyncHttpClient that pass in a, say, HttpClientBuilder that has overridable methods for getting the SchemeRegistry, socketTimeout parameters etc? Then our project could create a specialised version of that class when we create a new AsyncHttpClient, that sets up the ConnectionManager with our desired SchemeRegistry.

@smarek
Copy link
Member

smarek commented Oct 14, 2013

There is now change, which allows you to set default ports for HTTP and HTTPS (thus first part of work with SchemeRegistry)

Also if you're getting certificate error, you can use constructor AsyncHttpClient(boolean) to not verify certificates (consequence of one bug fix)

But I'm letting this issue open, as I like the option to provide configured HttpClient/override SchemeRegistry if needed.

@ghost ghost assigned smarek Oct 14, 2013
@smarek smarek closed this as completed in be2bac0 Oct 15, 2013
iNdieboyjeff pushed a commit to iNdieboyjeff/android-async-http that referenced this issue Oct 17, 2013
# By Peter Edwards (6) and others
# Via Marek Sebera (2) and others
* 'master' of https://github.com/loopj/android-async-http:
  Undid example change for now
  Classpath change
  Handling delete RequestParams in SyncHttpClient
  Throwing malformed URL fixes android-async-http#115, Throwing Interrupted exception fixes android-async-http#323
  Javadoc for AsyncHttpClient
  Fixes android-async-http#227
  Fixes android-async-http#253
  Allow request params of nested map, list, and set
  change retry handler to call appropriate method
  Fix SyncHttpClient to work with @sweetlilmre refactored code
  Added FileAsyncHttpResponseHandler based on: android-async-http#134
  Big download fixes: Removed unnecessary buffer copy (should allow for larger downloads and helps to combat VM heap constraints) Wrapped allocation in OutOfMemory handler, current behaviour will signal the GC and retry. This _sometimes_ works if GC has a change to run
  Reworked Json handler to parse json on the download thread in the failure case and fixed the messaging to be consistant updated javadocs
  Refactored AsyncHttpResponseHandler.java code base to facilitate a single base class and to use binary as the base response format Refactored dependent AsyncHttpResponseHandler.java classes: BinaryHttpResponseHandler.java, JsonHttpResponseHandler.java Added new ResponseHandler: TextHttpResponseHandler.java Cleaned up exception handling, added missing exception handling and mofified RetryHandler behavior to be more robust Moved handler to separate class to avoid leaks in AsyncHttpRequest.java Added PROGRESS and RETRY messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants