Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
firm1 committed Sep 13, 2016
1 parent abfca58 commit a787621
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -5,6 +5,7 @@
import com.zestedesavoir.zestwriter.model.Content;
import com.zestedesavoir.zestwriter.model.Extract;
import com.zestedesavoir.zestwriter.model.MetaContent;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.fluent.Request;
import org.apache.http.client.fluent.Executor;
Expand Down Expand Up @@ -78,14 +79,15 @@ public static Content loadManifest(String folder, String owner, String repo) thr

Executor executor = null;
if(github_user != null && !github_user.equals("") && github_token != null && !github_token.equals("")) {
executor = Executor.newInstance().auth(github_user, github_token);
executor = Executor
.newInstance()
.auth(new HttpHost("api.github.com"), github_user, github_token);
logger.debug("Authentification avec "+github_user+":"+github_token);
} else {
executor = Executor.newInstance();
}

String json = executor.execute(Request.Get(projecUrl)).returnContent().asString();
//String json = Request.Get(projecUrl).execute().returnContent().asString();
ObjectMapper mapper = new ObjectMapper();
Map map = mapper.readValue(json, Map.class);
if(map.containsKey("description")) {
Expand Down

0 comments on commit a787621

Please sign in to comment.