Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisMi committed Nov 7, 2014
1 parent 0ec4650 commit 556cd4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -80,6 +80,9 @@ fullContact.sendRequest(personRequest, new FCCallback() {
}
});
```

You can see a simple demo of this client in action in the [Hello World app example!](https://github.com/fullcontact/fullcontact4j/blob/master/example/java/FullContactHelloWorld.java)

###Making Requests###
First, let’s get our request builder.
```java
Expand Down Expand Up @@ -153,6 +156,8 @@ if(response.getStatus() == 200) { //202 (searching) is possible here, we'll get
LocationEnrichmentResponse location = client.sendRequest(locationRequest);
System.out.println("I found a new place in " + location.getContinent() + " with a population of " + location.getPopulation());
```

__When you're done with the client, be sure to call `shutDown()` on it.__ Otherwise, you could end up with a small memory leak from unfinished request threads.
###Error Handling###
If an error is encountered (these correspond to yellow/red non-2xx response codes on the [API flow diagrams](https://www.fullcontact.com/developer/docs/person/#flow-diagram)), a `FullContactException` is created with useful information about the error, including `errorCode` and a message from the FullContact APIs about the nature of the error. For synchronous requests, this will cause `sendRequest()` to throw `FullContactException`. In asynchronous requests, `FCCallback.failure(FullContactException exception)` is called instead.
###Supported APIs###
Expand Down

0 comments on commit 556cd4c

Please sign in to comment.