Package org.apache.http.client.fluent

Examples of org.apache.http.client.fluent.Request.execute()


        .addHeader("Accept", APPLICATION_JSON.getMimeType())
        .bodyString(jsonEntity, APPLICATION_JSON).connectTimeout(5000)
        .socketTimeout(5000);
    Response response;
    try {
      response = req.execute();
    } catch (IOException e) {
      throw new OrionConnectorException("Could not execute HTTP request",
          e);
    }
View Full Code Here


    // curl -i -X GET -H "X-Parse-Application-Id: z8NmDvVsa7WPBpqsQGXtrqZRyVlokCNoEb40BdOE" -H "X-Parse-REST-API-Key: m1KOhmEbRcPlCkvGHiPKN71Y2H1zPeXZnACaB9H6"  "https://api.parse.com/1/classes/token_states?where={"state": "23456"} "
    TokenCodeState readTokenState(String requestUuid) throws IOException {
        final URI read = tokenStatesUri(requestUuid);
        final Request request = parseConfiguration.configureRequest(Request.Get(read));
        final TokenCodeState tokenCode = request.execute().handleResponse(new ResponseHandler<TokenCodeState>() {

            @Override
            public TokenCodeState handleResponse(HttpResponse response) throws ClientProtocolException, IOException {
                final TokenCodeState tokenCode;
                if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK){
View Full Code Here

                }

                final TokenServiceResponse token;
                final Response response;
                try {
                    response = request.execute();
                    final String responseContent = response.returnContent().asString();

                    token = mapper.readValue(responseContent, TokenServiceResponse.class);
                } catch (JsonParseException e) {
                    throw new RuntimeException("Infusionsoft's protocol seemingly has changed.  Invalid Token service response.", e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.