public class ConsumerPactBuilder.PactDslRequestWithPath
extends java.lang.Object
| Constructor and Description |
|---|
PactDslRequestWithPath(ConsumerPactBuilder.PactDslRequestWithPath existing,
java.lang.String description) |
PactDslRequestWithPath(java.lang.String consumerName,
java.lang.String providerName,
java.lang.String state,
java.lang.String description,
java.lang.String path,
java.lang.String requestMethod,
java.util.Map<java.lang.String,java.lang.String> requestHeaders,
java.lang.String query,
java.lang.String requestBody,
java.util.Map<java.lang.String,java.lang.Object> requestMatchers) |
| Modifier and Type | Method and Description |
|---|---|
ConsumerPactBuilder.PactDslRequestWithPath |
body(org.w3c.dom.Document body)
The body of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
body(DslPart body)
The body of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
body(org.json.JSONObject body)
The body of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
body(java.lang.String body)
The body of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
body(java.lang.String body,
org.apache.http.entity.ContentType mimeType)
The body of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
body(java.lang.String body,
java.lang.String mimeType)
The body of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
headers(java.util.Map<java.lang.String,java.lang.String> headers)
Headers to be included in the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
matchHeader(java.lang.String header,
java.lang.String regex)
Match a request header.
|
ConsumerPactBuilder.PactDslRequestWithPath |
matchHeader(java.lang.String header,
java.lang.String regex,
java.lang.String headerExample)
Match a request header.
|
ConsumerPactBuilder.PactDslRequestWithPath |
matchPath(java.lang.String pathRegex)
The path of the request.
|
ConsumerPactBuilder.PactDslRequestWithPath |
matchPath(java.lang.String pathRegex,
java.lang.String path)
The path of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
method(java.lang.String method)
The HTTP method for the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
path(java.lang.String path)
The path of the request
|
ConsumerPactBuilder.PactDslRequestWithPath |
query(java.lang.String query)
The query string for the request
|
ConsumerPactBuilder.PactDslResponse |
willRespondWith()
Define the response to return
|
public PactDslRequestWithPath(java.lang.String consumerName,
java.lang.String providerName,
java.lang.String state,
java.lang.String description,
java.lang.String path,
java.lang.String requestMethod,
java.util.Map<java.lang.String,java.lang.String> requestHeaders,
java.lang.String query,
java.lang.String requestBody,
java.util.Map<java.lang.String,java.lang.Object> requestMatchers)
public PactDslRequestWithPath(ConsumerPactBuilder.PactDslRequestWithPath existing, java.lang.String description)
public ConsumerPactBuilder.PactDslRequestWithPath method(java.lang.String method)
method - Valid HTTP methodpublic ConsumerPactBuilder.PactDslRequestWithPath headers(java.util.Map<java.lang.String,java.lang.String> headers)
headers - Key-value pairspublic ConsumerPactBuilder.PactDslRequestWithPath query(java.lang.String query)
query - query stringpublic ConsumerPactBuilder.PactDslRequestWithPath body(java.lang.String body)
body - Request body in string formpublic ConsumerPactBuilder.PactDslRequestWithPath body(java.lang.String body, java.lang.String mimeType)
body - Request body in string formpublic ConsumerPactBuilder.PactDslRequestWithPath body(java.lang.String body, org.apache.http.entity.ContentType mimeType)
body - Request body in string formpublic ConsumerPactBuilder.PactDslRequestWithPath body(org.json.JSONObject body)
body - Request body in JSON formpublic ConsumerPactBuilder.PactDslRequestWithPath body(DslPart body)
body - Built using the Pact body DSLpublic ConsumerPactBuilder.PactDslRequestWithPath body(org.w3c.dom.Document body) throws javax.xml.transform.TransformerException
body - XML Documentjavax.xml.transform.TransformerExceptionpublic ConsumerPactBuilder.PactDslRequestWithPath path(java.lang.String path)
path - string pathpublic ConsumerPactBuilder.PactDslRequestWithPath matchPath(java.lang.String pathRegex)
pathRegex - string path regular expression to match withpublic ConsumerPactBuilder.PactDslRequestWithPath matchPath(java.lang.String pathRegex, java.lang.String path)
path - string path to use when generating requestspathRegex - regular expression to use to match pathspublic ConsumerPactBuilder.PactDslRequestWithPath matchHeader(java.lang.String header, java.lang.String regex)
header - Header to matchregex - Regular expression to matchpublic ConsumerPactBuilder.PactDslRequestWithPath matchHeader(java.lang.String header, java.lang.String regex, java.lang.String headerExample)
header - Header to matchregex - Regular expression to matchheaderExample - Example value to usepublic ConsumerPactBuilder.PactDslResponse willRespondWith()