Uses of Class
org.springframework.test.web.client.response.DefaultResponseCreator
Packages that use DefaultResponseCreator
-
Uses of DefaultResponseCreator in org.springframework.test.web.client.response
Methods in org.springframework.test.web.client.response that return DefaultResponseCreatorModifier and TypeMethodDescriptionDefaultResponseCreator.body(byte[] content) Set the body as a byte array.Set the body as a UTF-8 String.Set the body as aResource.DefaultResponseCreator.contentType(MediaType mediaType) Set theContent-Typeheader.DefaultResponseCreator.headers(HttpHeaders headers) Copy all given headers.Set theLocationheader.static DefaultResponseCreatorMockRestResponseCreators.withBadRequest()ResponseCreatorfor a 400 response (BAD_REQUEST).static DefaultResponseCreatorMockRestResponseCreators.withCreatedEntity(URI location) ResponseCreatorfor a 201 response (CREATED) with a 'Location' header.static DefaultResponseCreatorMockRestResponseCreators.withNoContent()ResponseCreatorfor a 204 response (NO_CONTENT).static DefaultResponseCreatorMockRestResponseCreators.withServerError()ResponseCreatorfor a 500 response (SERVER_ERROR).static DefaultResponseCreatorMockRestResponseCreators.withStatus(HttpStatus status) ResponseCreatorwith a specific HTTP status.static DefaultResponseCreatorMockRestResponseCreators.withSuccess()ResponseCreatorfor a 200 response (OK).static DefaultResponseCreatorMockRestResponseCreators.withSuccess(byte[] body, MediaType contentType) ResponseCreatorfor a 200 response (OK) with byte[] body.static DefaultResponseCreatorMockRestResponseCreators.withSuccess(String body, MediaType contentType) ResponseCreatorfor a 200 response (OK) with String body.static DefaultResponseCreatorMockRestResponseCreators.withSuccess(Resource body, MediaType contentType) ResponseCreatorfor a 200 response (OK) content withResource-based body.static DefaultResponseCreatorMockRestResponseCreators.withUnauthorizedRequest()ResponseCreatorfor a 401 response (UNAUTHORIZED).