pixmob / httpclient Goto Github PK
View Code? Open in Web Editor NEWWrapper library around Android's HttpUrlConnection.
License: Apache License 2.0
Wrapper library around Android's HttpUrlConnection.
License: Apache License 2.0
Very often when you receive 4xx or 5xx codes you need to check the response content to find out what went wrong, but currently you only read inputstream when isStatusCodeError(statusCode) is false.
A network request is sent: expected status codes contains 404.
When the response is read with a status code 404, the error HttpClientException is raised, followed by a FileNotFoundException. As 404 was expected, this error should not happen.
Although the defaults make a lot of sense, sometimes a server doesn't play nice and you need to set a specific content encoding and character set to be accepted. For example, teh webserver I am talking to claims to support gzipped content, but often returns scrambled data when I ask for it.
I suggest keeping the defaults in place but allow setting of content encodings and charset on the HttpClient, so these settings are used in any successive http request.
Library does not support cache because it set conn.useCache(false) in HttpRequestBuilder.execute method
There should be a property and a getter for response so that I can check the response without using the handler. In some cases it's more convenient NOT to use handler. e.g. AsyncTask where you want to return the response in the doInBackground() method. It's good to make things flexible.
httpclient includes a fix for a bug in Android's HttpURLConnection
before Gingerbread such that headers are converted to lowercase. However, HttpRequestBuilder
's cookie parsing does not handle such cases, where the cookies header is "set-cookies"
instead of "Set-Cookies"
. (The returned HttpResponse
has them properly set as "Set-Cookies"
header, but then the parsing into in-memory cookies already failed.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.