Package kong.unirest.core
Class Routes
java.lang.Object
kong.unirest.core.Routes
- All Implemented Interfaces:
Assert
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<Invocation> private final HttpMethod
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addInvoke
(Invocation invocation) private Headers
(package private) RawResponse
exchange
(HttpRequest request, Config config) private Optional
<Invocation> getBestMatch
(HttpRequest request) private Optional
<Invocation> getBestMatch
(HttpRequest request, boolean expected) (package private) HttpMethod
(package private) String
getPath()
Assert that any the request sent this body.Assert that any the request sent a multipart fieldAssert that any request to this method/path contained this header(package private) boolean
matches
(HttpMethod httpMethod, Path url) (package private) boolean
matches
(HttpRequest request) (package private) Expectation
private Integer
verify that all Expectations were fulfilled at least once.wasInvokedTimes
(int i) assert that this instance of method/path was invoked x times
-
Field Details
-
path
-
method
-
invokes
-
-
Constructor Details
-
Routes
Routes(HttpRequest request) -
Routes
-
-
Method Details
-
newExpectation
Expectation newExpectation() -
matches
-
exchange
-
matches
-
getBestMatch
-
getBestMatch
-
hadHeader
Description copied from interface:Assert
Assert that any request to this method/path contained this header -
hadBody
Description copied from interface:Assert
Assert that any the request sent this body. this only applies to non-multipart requests. -
hadField
Description copied from interface:Assert
Assert that any the request sent a multipart field -
allHeaders
-
wasInvokedTimes
Description copied from interface:Assert
assert that this instance of method/path was invoked x times- Specified by:
wasInvokedTimes
in interfaceAssert
- Parameters:
i
- the number of times invoked.- Returns:
- this Assert instance
-
sumInvokes
-
verifyAll
Description copied from interface:Assert
verify that all Expectations were fulfilled at least once. -
getMethod
HttpMethod getMethod() -
getPath
String getPath() -
addInvoke
-