Executes the AWS request.

@param request the AWS request to execute.
507013
public void execute(final AwsRequest request) {
    service.callFunction(
        Fields.EXECUTE_ACTION_NAME,
        Collections.singletonList(getRequestArgs(request)));
  }
269556
private HttpResponse execute(HttpClient client, HttpUriRequest request) throws IOException {
        if (localContext != null) {
            return client.execute(request, localContext);
        } else {
            return client.execute(request);
        }
    }
761921
public function run(&$request)
    {
        $this->detect($request);
        $request = $this->driver->formatIncomingRequest($request);
    }
812082
void postSuccess(final DownloadRequest request) {
    downloadPoster.execute(new Runnable() {
      @Override public void run() {
        request.downloadCallback().onSuccess(request.downloadId(), request.destinationFilePath());
      }
    });
  }
862951
private void handleShuffleState(final Request request) {

		String json = request.getParameter(SHUFFLE_REQUEST_KEY);
		if (Util.empty(json)) {
			return;
		}

		// New
		TreeItemIdNode newTree;
		try {
			newTree = TreeItemUtil.convertJsonToTree(json);
		} catch (Exception e) {
			LOG.warn("Could not parse JSON for shuffle tree items. " + e.getMessage());
			return;
		}

		// Current
		TreeItemIdNode currentTree = getCustomTree();

		boolean changed = !TreeItemUtil.isTreeSame(newTree, currentTree);

		if (changed) {
			setCustomTree(newTree);
			// Run the shuffle action (if set)
			final Action action = getShuffleAction();
			if (action != null) {
				final ActionEvent event = new ActionEvent(this, "shuffle");
				Runnable later = new Runnable() {
					@Override
					public void run() {
						action.execute(event);
					}
				};
				invokeLater(later);
			}
		}
	}
1114492
public void init(ServletRequest request)
    {
        String[] vals = request.getParameterValues(ITEM_PARAM);

        if (vals != null) {
            _retrieveMap = new HashMap();

            for (int i = 0; i < vals.length; i++) {
                String val = vals[i];
                int delimPos = val.indexOf(DELIM);
                if (delimPos != -1) {
                    String expressionToRetrieve = val.substring(0, delimPos);
                    String fieldID = val.substring(delimPos + 1);
                    _retrieveMap.put(fieldID, expressionToRetrieve);
                }
            }
        }

        _callbackFunc = request.getParameter(CALLBACK_PARAM);
    }
284878
protected Response executeRequest(Request request)
    {
        try
        {
            com.squareup.okhttp.Request httpRequest = buildHttpRequest(request);

            if(logger.isInfoEnabled())
                logger.info("Sending request: {} {}",httpRequest.method(),httpRequest.urlString());

            if(logger.isDebugEnabled() && request.getRequestMethod().isBodyRequest())
            {
                Buffer buffer = new Buffer();
                httpRequest.body().writeTo(buffer);
                if(maxLoggedBodySize == -1 || buffer.size() <= maxLoggedBodySize )
                    logger.debug("Request body: {}", buffer.readUtf8());
                else
                    logger.debug("Request body not captured: too large. ");
            }

            if(logger.isTraceEnabled())
                logger.trace("Request headers: {}",httpRequest.headers().toString());

            Response response = client.newCall(httpRequest).execute();

            if(response.code() == HttpURLConnection.HTTP_UNAUTHORIZED && authorizationFactory != null
                    && authorizationFactory.retryOnAuthenticationError())
            {
                if(authorizationFactory instanceof ResettableAuthorizationFactory)
                    ((ResettableAuthorizationFactory) authorizationFactory).reset();

                response = client.newCall(httpRequest).execute();
            }

            logger.info("Response code: {}",response.code());

            if(logger.isTraceEnabled())
                logger.trace("Response headers: {}",response.headers().toString());

            if(logger.isDebugEnabled())
            {
                ByteArrayOutputStream copy = new ByteArrayOutputStream();
                copy(response.body().byteStream(),copy);
                response = response.newBuilder().body(ResponseBody.create(response.body().contentType(),copy.toByteArray())).build();

                if(maxLoggedBodySize == -1 || copy.size() <= maxLoggedBodySize)
                    logger.debug("Response body: {}",copy.toString());
                else
                    logger.debug("Response body not captured: too large.");
            }
            if (response.code() >= HttpURLConnection.HTTP_BAD_REQUEST)
            {
                throw readException(response);
            }

            return response;
        }
        catch (IOException e)
        {
            throw new ClientConnectionException("Error calling service.",e);
        }

    }
90363
public void call(final T request, final Functor<String, RemoteService.Response> process) {
        call(request, process, null);
    }
670254
@Override
	public void handleRequest(final Request request) {
		super.handleRequest(request);

		WComponent visibleDialog = getVisible();

		if (visibleDialog != null) {
			visibleDialog.serviceRequest(request);
		}
	}
732708
@Override
	public void handleRequest(final Request request) {
		// Clear pressed
		clearPressed();

		String requestValue = request.getParameter(getId());
		boolean pressed = "x".equals(requestValue);

		// Only process on a POST
		if (pressed && !"POST".equals(request.getMethod())) {
			LOG.warn("Button pressed on a request that is not a POST. Will be ignored.");
			return;
		}

		setPressed(pressed, request);
	}
446994
private void fireRequestSent(final AbstractBody request) {
        assertUnlocked();

        BOSHMessageEvent event = null;
        for (BOSHClientRequestListener listener : requestListeners) {
            if (event == null) {
                event = BOSHMessageEvent.createRequestSentEvent(this, request);
            }
            try {
                listener.requestSent(event);
            } catch (Exception ex) {
                LOG.log(Level.WARNING, UNHANDLED, ex);
            }
        }
    }
1174881
@Override
	public void serviceRequest(final Request request) {
		// Get expected step count
		UIContext uic = UIContextHolder.getCurrent();
		int expected = uic.getEnvironment().getStep();

		// Step should already be set on the session
		if (expected == 0) {
			throw new SystemException(
					"Step count should already be set on the session before content request.");
		}

		// Get step count on the request
		int got = StepCountUtil.getRequestStep(request);

		// Check tokens match (both must be provided)
		if (expected == got) {
			// Process Service Request
			getBackingComponent().serviceRequest(request);
		} else if (!StepCountUtil.isStepOnRequest(request) && StepCountUtil.isCachedContentRequest(request)) {  // cached content (no step on request)
			// Process Service Request
			getBackingComponent().serviceRequest(request);
		} else {  // Invalid token
			// Set an error code
			LOG.warn(
					"Wrong step detected for content request. Expected step [" + expected + "] but got step [" + got
					+ "].");
			handleError();
		}

	}
574634
public function execute($request)
    {
        $logger = $GLOBALS['logger'];

        try {
            parent::execute($request);
        } catch(AuthenticationException $ex) {
            $logger->error('Unauthorized attempt to access resource, being redirected to home page', array($ex->getMessage()));
            $this->_handleUnauthenticatedAccess();
            $this->_response->send();
        }
    }
177903
protected String executeRequest(HttpRequestBase request) throws IOException {
        HttpResponse response = client.execute(request);
        HttpEntity entity = response.getEntity();
        if (response.getStatusLine().getStatusCode() == 200) {
            return EntityUtils.toString(entity, "utf-8");
        } else {
            EntityUtils.consumeQuietly(entity);
            throw new IOException(response.getStatusLine().toString());
        }
    }
731433
public void setRequest(HttpServletRequest request) {
		WaybackRequest wbRequest = new WaybackRequest();
		wbRequest.extractHttpRequestInfo(request);
		this.wbRequest = wbRequest;
	}
519173
protected void postOperation(AipRequest request) {
        if (isBceKey.get()) {
            // add aipSdk param
            request.addParam("aipSdk", "java");

            String bodyStr = request.getBodyStr();

            try {
                int len = bodyStr.getBytes(request.getContentEncoding()).length;
                request.addHeader(Headers.CONTENT_LENGTH, Integer.toString(len));
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }

            request.addHeader(Headers.CONTENT_MD5, SignUtil.md5(bodyStr, request.getContentEncoding()));

            String timestamp = Util.getCanonicalTime();
            request.addHeader(Headers.HOST, request.getUri().getHost());
            request.addHeader(Headers.BCE_DATE, timestamp);
            request.addHeader(Headers.AUTHORIZATION, CloudAuth.sign(request, this.aipKey, this.aipToken, timestamp));
        }
        else {
            request.addParam("aipSdk", "java");
            request.addParam("access_token", accessToken);
        }
    }
694657
public void service(ConnectionProtocol request)
  {
    RequestBaratine req = (RequestBaratine) request;
    
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    
    try {
      if (_webApp != null) {
        thread.setContextClassLoader(_webApp.classLoader());
      }
      
      for (RouteBaratine route : _routes) {
        if (route.service(req)) {
          return;
        }
      }
      
      if (_routes.length > 0) {
        req.halt(HttpStatus.METHOD_NOT_ALLOWED);
      }
      else {
        req.halt(HttpStatus.NOT_FOUND);
        
      }
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
  }