Skip to content

Commit d24ca38

Browse files
committed
Merge pull request AsyncHttpClient#1112 from wsargent/patch-1
Update README with org.asynchttpclient
2 parents 45e074c + b53b43e commit d24ca38

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ Latest `version`: [![Maven][mavenImg]][mavenLink]
1515

1616
## Installation
1717

18-
First, in order to add it to your Maven project, simply add this dependency:
18+
First, in order to add it to your Maven project, simply add this dependency -- see [mvnrepository](http://mvnrepository.com/artifact/org.asynchttpclient/async-http-client) for latest version:
1919

2020
```xml
2121
<dependency>
22-
<groupId>com.ning</groupId>
23-
<artifactId>async-http-client</artifactId>
24-
<version>version</version>
22+
<groupId>org.asynchttpclient</groupId>
23+
<artifactId>async-http-client</artifactId>
24+
<version>2.0.0-RC12</version>
2525
</dependency>
2626
```
2727

2828
You can also download the artifact
2929

30-
[Maven Search](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.ning%22%20AND%20a%3A%22async-http-client%22)
30+
[Maven Search](http://mvnrepository.com/artifact/org.asynchttpclient/async-http-client)
3131

3232
AHC is an abstraction layer that can work on top of the bare JDK, Netty and Grizzly.
3333
Note that the JDK implementation is very limited and you should **REALLY** use the other *real* providers.
@@ -66,11 +66,11 @@ Check [migration guide](MIGRATION.md) for migrating from 1.8 to 1.9.
6666
Then in your code you can simply do
6767

6868
```java
69-
import com.ning.http.client.*;
69+
import org.asynchttpclient.*;
7070
import java.util.concurrent.Future;
7171

7272
AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
73-
Future<Response> f = asyncHttpClient.prepareGet("http://www.ning.com/").execute();
73+
Future<Response> f = asyncHttpClient.prepareGet("http://www.example.com/").execute();
7474
Response r = f.get();
7575
```
7676

@@ -79,11 +79,11 @@ Note that in this case all the content must be read fully in memory, even if you
7979
You can also accomplish asynchronous (non-blocking) operation without using a Future if you want to receive and process the response in your handler:
8080

8181
```java
82-
import com.ning.http.client.*;
82+
import org.asynchttpclient.*;
8383
import java.util.concurrent.Future;
8484

8585
AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
86-
asyncHttpClient.prepareGet("http://www.ning.com/").execute(new AsyncCompletionHandler<Response>(){
86+
asyncHttpClient.prepareGet("http://www.example.com/").execute(new AsyncCompletionHandler<Response>(){
8787

8888
@Override
8989
public Response onCompleted(Response response) throws Exception{
@@ -104,11 +104,11 @@ asyncHttpClient.prepareGet("http://www.ning.com/").execute(new AsyncCompletionHa
104104
You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response
105105

106106
```java
107-
import com.ning.http.client.*;
107+
import org.asynchttpclient.*;
108108
import java.util.concurrent.Future;
109109

110110
AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
111-
Future<Integer> f = asyncHttpClient.prepareGet("http://www.ning.com/").execute(
111+
Future<Integer> f = asyncHttpClient.prepareGet("http://www.example.com/").execute(
112112
new AsyncCompletionHandler<Integer>(){
113113

114114
@Override
@@ -131,11 +131,11 @@ which is something you want to do for large responses: this way you can process
131131
You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back:
132132

133133
```java
134-
import com.ning.http.client.*;
134+
import org.asynchttpclient.*;
135135
import java.util.concurrent.Future;
136136

137137
AsyncHttpClient c = new AsyncHttpClient();
138-
Future<String> f = c.prepareGet("http://www.ning.com/").execute(new AsyncHandler<String>() {
138+
Future<String> f = c.prepareGet("http://www.example.com/").execute(new AsyncHandler<String>() {
139139
private ByteArrayOutputStream bytes = new ByteArrayOutputStream();
140140

141141
@Override

0 commit comments

Comments
 (0)