org.apache.http.HttpResponse.getParams()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(206)

本文整理了Java中org.apache.http.HttpResponse.getParams()方法的一些代码示例,展示了HttpResponse.getParams()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpResponse.getParams()方法的具体详情如下:
包路径:org.apache.http.HttpResponse
类名称:HttpResponse
方法名:getParams

HttpResponse.getParams介绍

暂无

代码示例

代码示例来源:origin: rest-assured/rest-assured

public HttpParams getParams() {
  return responseBase.getParams();
}

代码示例来源:origin: robovm/robovm

public void process(final HttpResponse response, final HttpContext context) 
    throws HttpException, IOException {
  if (response == null) {
    throw new IllegalArgumentException("HTTP request may not be null");
  }
  if (!response.containsHeader(HTTP.SERVER_HEADER)) {
    String s = (String) response.getParams().getParameter(
        CoreProtocolPNames.ORIGIN_SERVER);
    if (s != null) {
      response.addHeader(HTTP.SERVER_HEADER, s);
    }
  }
}

代码示例来源:origin: robovm/robovm

authScheme = registry.getAuthScheme(id, response.getParams());
  break;
} catch (IllegalStateException e) {

代码示例来源:origin: robolectric/robolectric

public HttpResponse emulateRequest(HttpHost httpHost, HttpRequest httpRequest, HttpContext httpContext, RequestDirector requestDirector) throws HttpException, IOException {
 if (logHttpRequests) {
  System.out.println("  <-- " + httpRequest.getRequestLine());
 }
 HttpResponse httpResponse = findResponse(httpRequest);
 if (logHttpRequests) {
  System.out.println("  --> " + (httpResponse == null ? null : httpResponse.getStatusLine().getStatusCode()));
 }
 if (httpResponse == null) {
  throw new RuntimeException("Unexpected call to execute, no pending responses are available. See Robolectric.addPendingResponse(). Request was: " +
    httpRequest.getRequestLine().getMethod() + " " + httpRequest.getRequestLine().getUri());
 } else {
  HttpParams params = httpResponse.getParams();
  if (HttpConnectionParams.getConnectionTimeout(params) < 0) {
   throw new ConnectTimeoutException("Socket is not connected");
  } else if (HttpConnectionParams.getSoTimeout(params) < 0) {
   throw new ConnectTimeoutException("The operation timed out");
  }
 }
 addRequestInfo(new HttpRequestInfo(httpRequest, httpHost, httpContext, requestDirector));
 addHttpResponse(httpResponse);
 return httpResponse;
}
public boolean hasPendingResponses() {

代码示例来源:origin: robovm/robovm

HttpParams params = response.getParams();

代码示例来源:origin: com.jayway.restassured/rest-assured

public HttpParams getParams() {
  return responseBase.getParams();
}

代码示例来源:origin: robovm/robovm

HttpStatus.SC_CONTINUE, context);
    response.setParams(
        new DefaultedHttpParams(response.getParams(), this.params));
            HttpStatus.SC_INTERNAL_SERVER_ERROR, context);
        response.setParams(
            new DefaultedHttpParams(response.getParams(), this.params));
        handleException(ex, response);
  response = this.responseFactory.newHttpResponse(ver, HttpStatus.SC_OK, context);
  response.setParams(
      new DefaultedHttpParams(response.getParams(), this.params));
   context);
response.setParams(
    new DefaultedHttpParams(response.getParams(), this.params));
handleException(ex, response);

代码示例来源:origin: org.esigate/esigate-core

@SuppressWarnings("deprecation")
@Override
public org.apache.http.params.HttpParams getParams() {
  return httpResponse.getParams();
}

代码示例来源:origin: Nextdoor/bender

@Override
@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: ibinti/bugvm

@Override
@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: com.github.paweladamski/HttpClientMock

/**
 * @deprecated
 */
@Deprecated
public HttpParams getParams() {
  return this.original.getParams();
}

代码示例来源:origin: com.bugvm/bugvm-rt

@Override
@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: com.hynnet/httpclient

@Override
@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: org.apache.httpcomponents/httpclient-android

@Deprecated
public HttpParams getParams() {
  return original.getParams();
}

代码示例来源:origin: stackoverflow.com

HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet("https://accounts.google.com/o/oauth2/auth?access_type=online&approval_prompt=auto&client_id=22fdgdfg40-1gmgdfggdps0hfol.apps.googleusercontent.com&redirect_uri=https://tito.com/&response_type=code&scope=https://www.googleapis.com/auth/admin.directory.group%20https://www.googleapis.com/auth/admin.directory.group.readonly");
HttpResponse responses = client.execute(httpget);

HttpParams param = responses.getParams();

responses.getParams().getParameter("code");
System.out.println(responses.getParams().getParameter("code"));
System.out.println("Response Code : " + responses.getStatusLine().getStatusCode());

代码示例来源:origin: com.hynnet/httpclient

@Override
protected List<String> getAuthPreferences(
    final HttpResponse response,
    final HttpContext context) {
  @SuppressWarnings("unchecked")
  final
  List<String> authpref = (List<String>) response.getParams().getParameter(
      AuthPNames.PROXY_AUTH_PREF);
  if (authpref != null) {
    return authpref;
  } else {
    return super.getAuthPreferences(response, context);
  }
}

代码示例来源:origin: MobiVM/robovm

public void process(final HttpResponse response, final HttpContext context) 
    throws HttpException, IOException {
  if (response == null) {
    throw new IllegalArgumentException("HTTP request may not be null");
  }
  if (!response.containsHeader(HTTP.SERVER_HEADER)) {
    String s = (String) response.getParams().getParameter(
        CoreProtocolPNames.ORIGIN_SERVER);
    if (s != null) {
      response.addHeader(HTTP.SERVER_HEADER, s);
    }
  }
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

public void process(final HttpResponse response, final HttpContext context) 
    throws HttpException, IOException {
  if (response == null) {
    throw new IllegalArgumentException("HTTP request may not be null");
  }
  if (!response.containsHeader(HTTP.SERVER_HEADER)) {
    String s = (String) response.getParams().getParameter(
        CoreProtocolPNames.ORIGIN_SERVER);
    if (s != null) {
      response.addHeader(HTTP.SERVER_HEADER, s);
    }
  }
}

相关文章