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

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

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

Response.getHeader介绍

暂无

代码示例

代码示例来源:origin: lv.ctco.cukes/cukes-http

@Override
protected boolean matchesSafely(Response response) {
  String actualHeaderValue = response.getHeader(header);
  return matcher.matches(actualHeaderValue);
}

代码示例来源:origin: com.hotels/heat-core-utils

if (headerEntry.getValue() instanceof String) {
  String headerExpectedValue = (String) headerEntry.getValue();
  String currentHeader = ((Response) responses).getHeader(headerName);

代码示例来源:origin: HotelsDotCom/heat

if (headerEntry.getValue() instanceof String) {
  String headerExpectedValue = (String) headerEntry.getValue();
  String currentHeader = ((Response) responses).getHeader(headerName);

代码示例来源:origin: ctco/cukes

@Override
protected boolean matchesSafely(Response response) {
  String actualHeaderValue = response.getHeader(header);
  return matcher.matches(actualHeaderValue);
}

代码示例来源:origin: lv.ctco.cukes/cukes-http

@Override
public void varAssignedFromHeader(@InflateContext.Ignore String varName, String headerName) {
  String value = this.facade.response().getHeader(headerName);
  this.world.put(varName, value);
}

代码示例来源:origin: ctco/cukes

@Override
public void varAssignedFromHeader(@InflateContext.Ignore String varName, String headerName) {
  String value = this.facade.response().getHeader(headerName);
  this.world.put(varName, value);
}

代码示例来源:origin: HotelsDotCom/heat

private String getHeaderVar(String inputString) {
  TestCaseUtils testCaseUtils = TestSuiteHandler.getInstance().getTestCaseUtils();
  String headerNameToRetrieve = testCaseUtils.regexpExtractor(inputString, REGEXP_HEADER_JSONPATH, 1);
  return response.headers().hasHeaderWithName(headerNameToRetrieve) ? response.getHeader(headerNameToRetrieve) : inputString;
}

代码示例来源:origin: com.hotels/heat-core-utils

private String getHeaderVar(String inputString) {
  TestCaseUtils testCaseUtils = TestSuiteHandler.getInstance().getTestCaseUtils();
  String headerNameToRetrieve = testCaseUtils.regexpExtractor(inputString, REGEXP_HEADER_JSONPATH, 1);
  return response.headers().hasHeaderWithName(headerNameToRetrieve) ? response.getHeader(headerNameToRetrieve) : inputString;
}

代码示例来源:origin: marklogic/marklogic-data-hub

public String doLogin() {
  Response loginResponse =
      given()
        .body(loginInfo)
      .when()
        .post("/api/login");
  if(loginResponse.statusCode() == 200) {
    sessionID = StringUtils.substringBetween(loginResponse.getHeader("Set-Cookie"), "JSESSIONID=", ";");
  }
  // building cookie to use for subsequent endpoint requests
  buildCookie();
  return sessionID;
}

相关文章