Package com.github.tomakehurst.wiremock.http

Examples of com.github.tomakehurst.wiremock.http.HttpHeader


    private static Predicate<Map.Entry<String, ValuePattern>> matchHeadersIn(final Request request) {
        return new Predicate<Map.Entry<String, ValuePattern>>() {
            public boolean apply(Map.Entry<String, ValuePattern> headerPattern) {
                ValuePattern headerValuePattern = headerPattern.getValue();
                String key = headerPattern.getKey();
                HttpHeader header = request.header(key);

                boolean match = header.hasValueMatching(headerValuePattern);

                if (!match) {
                    notifier().info(String.format(
                            "URL %s is match, but header %s is not. For a match, value should %s",
                            request.getUrl(),
View Full Code Here


    this.status = status;
    return this;
  }
 
  public ResponseDefinitionBuilder withHeader(String key, String value) {
    headers.add(new HttpHeader(key, value));
    return this;
  }
View Full Code Here

    this.responseBody = responseBody;
    return this;
  }
 
  public RequestResponseMappingBuilder withHeader(String key, String value) {
    headers.add(new HttpHeader(key, value));
    return this;
  }
View Full Code Here

TOP

Related Classes of com.github.tomakehurst.wiremock.http.HttpHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.