Example usage for org.springframework.restdocs.operation OperationRequest getContent

List of usage examples for org.springframework.restdocs.operation OperationRequest getContent

Introduction

In this page you can find the example usage for org.springframework.restdocs.operation OperationRequest getContent.

Prototype

byte[] getContent();

Source Link

Document

Returns the content of the request.

Usage

From source file:io.github.restdocsext.jersey.operation.preprocess.BinaryPartPlaceholderOperationPreprocessor.java

@Override
public OperationRequest preprocess(OperationRequest request) {
    final Collection<OperationRequestPart> parts = request.getParts();
    if (parts.isEmpty()) {
        return request;
    }//from   w  w w.j a va 2 s .c o m
    final Collection<OperationRequestPart> modifiedParts = modifyParts(parts);
    return this.requestFactory.create(request.getUri(), request.getMethod(), request.getContent(),
            request.getHeaders(), request.getParameters(), modifiedParts);
}