Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpResponse<String> jsonResponse = null;
- try {
- jsonResponse = Unirest.post(targetURL).header("Accept", "application/json")
- .header("Content-Type", "application/json;").body(urlParameters).asString();
- } catch (UnirestException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- String str = jsonResponse.toString();
- HttpInputMessage inputMessage = null;
- return inputMessage;
- RoutesList routes = new RoutesList();
- Post post = new Post(this.url + allRoutes, depoId.toString());
- HttpInputMessage inputMessage = null;
- try {
- inputMessage = post.getResult();
- } catch (Exception e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- try {
- converter.read(routes.getClass(), RoutesList.class, inputMessage);
- } catch (HttpMessageNotReadableException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- HttpComponentsAsyncClientHttpResponse(HttpResponse httpResponse)
- return new HttpComponentsAsyncClientHttpResponse(jsonResponse)
Add Comment
Please, Sign In to add comment