io.restassured.response.Response.getStatusLine()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(227)

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

Response.getStatusLine介绍

暂无

代码示例

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

/**
 * Clone an already existing response.
 *
 * @return Builder.
 */
public ResponseBuilder clone(Response response) {
  if (isRestAssuredResponse(response)) {
    final RestAssuredResponseImpl raResponse = raResponse(response);
    restAssuredResponse.setContent(raResponse.getContent());
    restAssuredResponse.setHasExpectations(raResponse.getHasExpectations());
    restAssuredResponse.setDefaultContentType(raResponse.getDefaultContentType());
    restAssuredResponse.setDecoderConfig(raResponse.getDecoderConfig());
    restAssuredResponse.setSessionIdName(raResponse.getSessionIdName());
    restAssuredResponse.setConnectionManager(raResponse.getConnectionManager());
    restAssuredResponse.setConfig(raResponse.getConfig());
    restAssuredResponse.setRpr(raResponse.getRpr());
    restAssuredResponse.setLogRepository(raResponse.getLogRepository());
    restAssuredResponse.setFilterContextProperties(raResponse.getFilterContextProperties());
  } else {
    restAssuredResponse.setContent(response.asInputStream());
  }
  restAssuredResponse.setContentType(response.getContentType());
  restAssuredResponse.setCookies(response.getDetailedCookies());
  restAssuredResponse.setResponseHeaders(response.getHeaders());
  restAssuredResponse.setStatusCode(response.getStatusCode());
  restAssuredResponse.setStatusLine(response.getStatusLine());
  return this;
}

代码示例来源:origin: com.adobe.ride/ride-core

+ getBodyString(requestSpec.getBody(), "request") + System.lineSeparator()
+ System.lineSeparator() + System.lineSeparator() + "RESPONSE: "
+ System.lineSeparator() + " " + response.getStatusLine() + System.lineSeparator()
+ getHeaderString(response.getHeaders()) + System.lineSeparator()
+ getBodyString(response.getBody(), "response") + System.lineSeparator()

相关文章