Class MockRequestBuilder
java.lang.Object
com.codename1.backend.test.MockRequestBuilder
- Direct Known Subclasses:
MockMultipartRequestBuilder
One request for
MockMvc, built by MockMvcRequestBuilders.-
Method Summary
Modifier and TypeMethodDescriptionThe Accept header.characterEncoding(String encoding) Accepted for familiarity; bodies are always UTF-8 here.content(byte[] body) The body, as bytes.The body, as UTF-8 text.contentType(String type) The Content-Type header.A cookie, sent in the Cookie header.Adds a header; several values are sent as one comma-separated field.Adds a request parameter: a query parameter, which@RequestParamreads.queryParam(String name, String... values) Adds a query parameter: the same asparam(String, String...), except on a multipart builder, whose param() adds a form field instead and whose queryParam() still puts the value in the URL.
-
Method Details
-
header
Adds a header; several values are sent as one comma-separated field. -
param
Adds a request parameter: a query parameter, which@RequestParamreads. -
queryParam
Adds a query parameter: the same asparam(String, String...), except on a multipart builder, whose param() adds a form field instead and whose queryParam() still puts the value in the URL. -
content
The body, as UTF-8 text. -
content
The body, as bytes. -
contentType
The Content-Type header. -
accept
The Accept header. -
cookie
A cookie, sent in the Cookie header. -
characterEncoding
Accepted for familiarity; bodies are always UTF-8 here.
-