Search in sources :

Example 1 with HttpHeader

use of com.github.tomakehurst.wiremock.http.HttpHeader in project spring-cloud-netflix by spring-cloud.

the class WireMockRestAssuredRequestAdapter method getHeaders.

@Override
public HttpHeaders getHeaders() {
    List<HttpHeader> headers = new ArrayList<>();
    for (Header header : request.getHeaders()) {
        String value = header.getValue();
        if ("accept".equals(header.getName().toLowerCase()) && "*/*".equals(value)) {
            continue;
        }
        headers.add(new HttpHeader(header.getName(), header.getValue()));
    }
    return new HttpHeaders(headers);
}
Also used : HttpHeaders(com.github.tomakehurst.wiremock.http.HttpHeaders) HttpHeader(com.github.tomakehurst.wiremock.http.HttpHeader) Header(io.restassured.http.Header) ContentTypeHeader(com.github.tomakehurst.wiremock.http.ContentTypeHeader) HttpHeader(com.github.tomakehurst.wiremock.http.HttpHeader) ArrayList(java.util.ArrayList)

Aggregations

ContentTypeHeader (com.github.tomakehurst.wiremock.http.ContentTypeHeader)1 HttpHeader (com.github.tomakehurst.wiremock.http.HttpHeader)1 HttpHeaders (com.github.tomakehurst.wiremock.http.HttpHeaders)1 Header (io.restassured.http.Header)1 ArrayList (java.util.ArrayList)1