Git Product home page Git Product logo

async-http-client's Introduction

An Async HTTP Client Based on Netty

I write this for my personal part time project RSSMiner, for the web crawler and feed fetcher module.

Please checkout out http-kit, it should have better performance.

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

<dependency>
	<groupId>me.shenfeng</groupId>
	<artifactId>async-http-client</artifactId>
	<version>1.1.0</version>
</dependency>
; You may want to write an wrapper function to make it easier to use in Clojure project
[me.shenfeng/async-http-client "1.1.0"]

Features

  • Asynchronous
  • Minimum: just download webpages from Internet efficently.
  • Support SOCKS v5, HTTP proxy
  • HTTPS(trust all)
  • Configurable
  • DNS prefetch,

Limitations:

  • All Content are buffered in memory as byte array=> can not handle large file. Anyway, it's meant to download webpages(zipped if server support)
  • Dns prefetch is IPV4 only.

Example

  // Http client sample usage
   HttpClientConfig config = new HttpClientConfig();
   header = new HashMap<String, Object>();
   HttpClient client = new HttpClient(config);
   URI uri = new URI("http://onycloud.com");
   final HttpResponseFuture future = client.execGet(uri, header);
   resp.addListener(new Runnable() {
       public void run() {
           HttpResponse resp = future.get(); // async
       }
   });
   HttpResponse resp = future.get(); // blocking

License

Copyright © 2012 Feng Shen. Distributed under the Apache License Version 2.0.

async-http-client's People

Contributors

shenfeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

async-http-client's Issues

Missing license

Hi,

I really like to try your code. Unfortunately, I am missing basic license information (e.g. MIT, Apache or Eclipse). If this is not too much trouble, could please clearly articulate your licensing policy?

Thank you. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.