Permalink
Browse files

user agent

  • Loading branch information...
1 parent 9801291 commit 9a2ff274729f0a919a618463af6f7d17395f41dd @TioBorracho TioBorracho committed Sep 29, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/com/mercadolibre/sdk/Meli.java
@@ -10,6 +10,7 @@
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import com.ning.http.client.AsyncHttpClient;
+import com.ning.http.client.AsyncHttpClientConfig;
import com.ning.http.client.AsyncHttpClient.BoundRequestBuilder;
import com.ning.http.client.FluentStringsMap;
import com.ning.http.client.Response;
@@ -20,7 +21,12 @@
private String refreshToken;
private int clientId;
private String clientSecret;
- private AsyncHttpClient http = new AsyncHttpClient();
+ private AsyncHttpClient http;
+ {
+ AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder()
+ .setUserAgent("MELI-JAVA-SDK-0.0.1").build();
+ http = new AsyncHttpClient(cf);
+ }
public Meli(int clientId, String clientSecret) {
this.clientId = clientId;

0 comments on commit 9a2ff27

Please sign in to comment.