Skip to content

fufulabs/Android-HttpClient

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

116 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android-HttpClient

An Android library to make HTTP calls with parameters easier.

There is a module to support OAuth signatures using oauth-signpost.

There is a module that supports OkHttp for SPDY and other enhancements.

Features

  • Multipart POST of File and InputStream
  • URL-encoded JSON data
  • URL-encoded String data
  • easy addition of parameters to GET queries
  • lightweight on memory
  • get the result of a query directly as a String
  • single Exception type thrown from the HttpClient
  • support for timeouts per queries
  • custom logging per HTTP query
  • support for high-level cookie handling
  • set the user language for all HTTP queries

Sample Code

HttpParamsMultiPart multipart = new HttpParamsMultiPart();
multipart.addFile("file", myImageFile, "image/png");
multipart.add("text", "my picture");

HttpRequestPost post = new HttpRequestPost("http://my.com/picture.upload", multipart);

String response = HttpClient.getStringResponse(post);

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 95.6%
  • Groovy 4.4%