public class PactDslRequestWithoutPath extends PactDslRequestBase
CONTENT_TYPE, defaultRequestValues, query, requestBody, requestGenerators, requestHeaders, requestMatchers, requestMethod| Constructor and Description |
|---|
PactDslRequestWithoutPath(ConsumerPactBuilder consumerPactBuilder,
PactDslWithState pactDslWithState,
java.lang.String description,
PactDslRequestWithoutPath defaultRequestValues,
PactDslResponse defaultResponseValues) |
| Modifier and Type | Method and Description |
|---|---|
PactDslRequestWithoutPath |
body(org.w3c.dom.Document body)
The body of the request
|
PactDslRequestWithoutPath |
body(DslPart body)
The body of the request
|
PactDslRequestWithoutPath |
body(org.json.JSONObject body)
The body of the request
|
PactDslRequestWithoutPath |
body(org.apache.http.entity.mime.MultipartEntityBuilder body)
The body of the request
|
PactDslRequestWithoutPath |
body(au.com.dius.pact.consumer.xml.PactXmlBuilder xmlBuilder)
XML Response body to return
|
PactDslRequestWithoutPath |
body(java.lang.String body)
The body of the request
|
PactDslRequestWithoutPath |
body(java.lang.String body,
org.apache.http.entity.ContentType contentType)
The body of the request
|
PactDslRequestWithoutPath |
body(java.lang.String body,
java.lang.String contentType)
The body of the request
|
PactDslRequestWithoutPath |
body(java.util.function.Supplier<java.lang.String> body)
The body of the request
|
PactDslRequestWithoutPath |
body(java.util.function.Supplier<java.lang.String> body,
org.apache.http.entity.ContentType contentType)
The body of the request
|
PactDslRequestWithoutPath |
body(java.util.function.Supplier<java.lang.String> body,
java.lang.String contentType)
The body of the request
|
PactDslRequestWithoutPath |
bodyWithSingleQuotes(java.lang.String body)
The body of the request with possible single quotes as delimiters
and using
QuoteUtil to convert single quotes to double quotes if required. |
PactDslRequestWithoutPath |
bodyWithSingleQuotes(java.lang.String body,
org.apache.http.entity.ContentType contentType)
The body of the request with possible single quotes as delimiters
and using
QuoteUtil to convert single quotes to double quotes if required. |
PactDslRequestWithoutPath |
bodyWithSingleQuotes(java.lang.String body,
java.lang.String contentType)
The body of the request with possible single quotes as delimiters
and using
QuoteUtil to convert single quotes to double quotes if required. |
PactDslRequestWithoutPath |
headerFromProviderState(java.lang.String name,
java.lang.String expression,
java.lang.String example)
Adds a header that will have it's value injected from the provider state
|
PactDslRequestWithoutPath |
headers(java.util.Map<java.lang.String,java.lang.String> headers)
Headers to be included in the request
|
PactDslRequestWithoutPath |
headers(java.lang.String firstHeaderName,
java.lang.String firstHeaderValue,
java.lang.String... headerNameValuePairs)
Headers to be included in the request
|
PactDslRequestWithPath |
matchPath(java.lang.String pathRegex)
The path of the request.
|
PactDslRequestWithPath |
matchPath(java.lang.String pathRegex,
java.lang.String path)
The path of the request
|
PactDslRequestWithoutPath |
method(java.lang.String method)
The HTTP method for the request
|
PactDslRequestWithPath |
path(java.lang.String path)
The path of the request
|
PactDslRequestWithPath |
pathFromProviderState(java.lang.String expression,
java.lang.String example)
Sets the path to have it's value injected from the provider state
|
PactDslRequestWithoutPath |
query(java.lang.String query)
The query string for the request
|
PactDslRequestWithoutPath |
queryMatchingDate(java.lang.String field,
java.lang.String pattern)
Matches a date field using the provided date pattern.
|
PactDslRequestWithoutPath |
queryMatchingDate(java.lang.String field,
java.lang.String pattern,
java.lang.String example)
Matches a date field using the provided date pattern
|
PactDslRequestWithoutPath |
queryMatchingDatetime(java.lang.String field,
java.lang.String pattern)
Matches a datetime field using the provided pattern.
|
PactDslRequestWithoutPath |
queryMatchingDatetime(java.lang.String field,
java.lang.String pattern,
java.lang.String example)
Matches a datetime field using the provided pattern
|
PactDslRequestWithoutPath |
queryMatchingISODate(java.lang.String field)
Matches a date field using the ISO date pattern.
|
PactDslRequestWithoutPath |
queryMatchingISODate(java.lang.String field,
java.lang.String example)
Matches a date field using the ISO date pattern
|
PactDslRequestWithoutPath |
queryMatchingISODatetime(java.lang.String field)
Matches a datetime field using the ISO pattern.
|
PactDslRequestWithoutPath |
queryMatchingISODatetime(java.lang.String field,
java.lang.String example)
Matches a datetime field using the ISO pattern
|
PactDslRequestWithoutPath |
queryMatchingISOTime(java.lang.String field,
java.lang.String example)
Matches a time field using the ISO time pattern
|
PactDslRequestWithoutPath |
queryMatchingTime(java.lang.String field)
Matches a time field using the ISO time pattern.
|
PactDslRequestWithoutPath |
queryMatchingTime(java.lang.String field,
java.lang.String pattern)
Matches a time field using the provided time pattern.
|
PactDslRequestWithoutPath |
queryMatchingTime(java.lang.String field,
java.lang.String pattern,
java.lang.String example)
Matches a time field using the provided time pattern
|
PactDslRequestWithoutPath |
queryParameterFromProviderState(java.lang.String name,
java.lang.String expression,
java.lang.String example)
Adds a query parameter that will have it's value injected from the provider state
|
PactDslRequestWithoutPath |
withFileUpload(java.lang.String partName,
java.lang.String fileName,
java.lang.String fileContentType,
byte[] data)
Sets up a file upload request.
|
getContentTypeHeader, isContentTypeHeaderNotSet, queryMatchingDateBase, queryMatchingDatetimeBase, queryMatchingTimeBase, setupDefaultValues, setupFileUpload, setupMultipartpublic PactDslRequestWithoutPath(ConsumerPactBuilder consumerPactBuilder, PactDslWithState pactDslWithState, java.lang.String description, PactDslRequestWithoutPath defaultRequestValues, PactDslResponse defaultResponseValues)
public PactDslRequestWithoutPath method(java.lang.String method)
method - Valid HTTP methodpublic PactDslRequestWithoutPath headers(java.util.Map<java.lang.String,java.lang.String> headers)
headers - Key-value pairspublic PactDslRequestWithoutPath headers(java.lang.String firstHeaderName, java.lang.String firstHeaderValue, java.lang.String... headerNameValuePairs)
firstHeaderName - The name of the first headerfirstHeaderValue - The value of the first headerheaderNameValuePairs - Additional headers in name-value pairs.public PactDslRequestWithoutPath query(java.lang.String query)
query - query stringpublic PactDslRequestWithoutPath body(java.lang.String body)
body - Request body in string formpublic PactDslRequestWithoutPath body(java.lang.String body, java.lang.String contentType)
body - Request body in string formpublic PactDslRequestWithoutPath body(java.lang.String body, org.apache.http.entity.ContentType contentType)
body - Request body in string formpublic PactDslRequestWithoutPath body(java.util.function.Supplier<java.lang.String> body)
body - Request body in Java Functional Interface Supplier that must return a stringpublic PactDslRequestWithoutPath body(java.util.function.Supplier<java.lang.String> body, java.lang.String contentType)
body - Request body in Java Functional Interface Supplier that must return a stringpublic PactDslRequestWithoutPath body(java.util.function.Supplier<java.lang.String> body, org.apache.http.entity.ContentType contentType)
body - Request body in Java Functional Interface Supplier that must return a stringpublic PactDslRequestWithoutPath bodyWithSingleQuotes(java.lang.String body)
QuoteUtil to convert single quotes to double quotes if required.body - Request body in string formpublic PactDslRequestWithoutPath bodyWithSingleQuotes(java.lang.String body, java.lang.String contentType)
QuoteUtil to convert single quotes to double quotes if required.body - Request body in string formpublic PactDslRequestWithoutPath bodyWithSingleQuotes(java.lang.String body, org.apache.http.entity.ContentType contentType)
QuoteUtil to convert single quotes to double quotes if required.body - Request body in string formpublic PactDslRequestWithoutPath body(org.json.JSONObject body)
body - Request body in JSON formpublic PactDslRequestWithoutPath body(DslPart body)
body - Built using the Pact body DSLpublic PactDslRequestWithoutPath body(org.w3c.dom.Document body) throws javax.xml.transform.TransformerException
body - XML Documentjavax.xml.transform.TransformerExceptionpublic PactDslRequestWithoutPath body(au.com.dius.pact.consumer.xml.PactXmlBuilder xmlBuilder)
xmlBuilder - XML Builder used to construct the XML documentpublic PactDslRequestWithoutPath body(org.apache.http.entity.mime.MultipartEntityBuilder body) throws java.io.IOException
body - Built using MultipartEntityBuilderjava.io.IOExceptionpublic PactDslRequestWithPath path(java.lang.String path)
path - string pathpublic PactDslRequestWithPath matchPath(java.lang.String pathRegex)
pathRegex - string path regular expression to match withpublic 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 PactDslRequestWithoutPath withFileUpload(java.lang.String partName, java.lang.String fileName, java.lang.String fileContentType, byte[] data) throws java.io.IOException
partName - This is the name of the part in the multipart body.fileName - This is the name of the file that was uploadedfileContentType - This is the content type of the uploaded filedata - This is the actual file contentsjava.io.IOExceptionpublic PactDslRequestWithoutPath headerFromProviderState(java.lang.String name, java.lang.String expression, java.lang.String example)
name - Header Nameexpression - Expression to be evaluated from the provider stateexample - Example value to use in the consumer testpublic PactDslRequestWithoutPath queryParameterFromProviderState(java.lang.String name, java.lang.String expression, java.lang.String example)
name - Nameexpression - Expression to be evaluated from the provider stateexample - Example value to use in the consumer testpublic PactDslRequestWithPath pathFromProviderState(java.lang.String expression, java.lang.String example)
expression - Expression to be evaluated from the provider stateexample - Example value to use in the consumer testpublic PactDslRequestWithoutPath queryMatchingDate(java.lang.String field, java.lang.String pattern, java.lang.String example)
field - field namepattern - pattern to matchexample - Example valuepublic PactDslRequestWithoutPath queryMatchingDate(java.lang.String field, java.lang.String pattern)
field - field namepattern - pattern to matchpublic PactDslRequestWithoutPath queryMatchingTime(java.lang.String field, java.lang.String pattern, java.lang.String example)
field - field namepattern - pattern to matchexample - Example valuepublic PactDslRequestWithoutPath queryMatchingTime(java.lang.String field, java.lang.String pattern)
field - field namepattern - pattern to matchpublic PactDslRequestWithoutPath queryMatchingDatetime(java.lang.String field, java.lang.String pattern, java.lang.String example)
field - field namepattern - pattern to matchexample - Example valuepublic PactDslRequestWithoutPath queryMatchingDatetime(java.lang.String field, java.lang.String pattern)
field - field namepattern - pattern to matchpublic PactDslRequestWithoutPath queryMatchingISODate(java.lang.String field, java.lang.String example)
field - field nameexample - Example valuepublic PactDslRequestWithoutPath queryMatchingISODate(java.lang.String field)
field - field namepublic PactDslRequestWithoutPath queryMatchingISOTime(java.lang.String field, java.lang.String example)
field - field nameexample - Example valuepublic PactDslRequestWithoutPath queryMatchingTime(java.lang.String field)
field - field namepublic PactDslRequestWithoutPath queryMatchingISODatetime(java.lang.String field, java.lang.String example)
field - field nameexample - Example valuepublic PactDslRequestWithoutPath queryMatchingISODatetime(java.lang.String field)
field - field name