Class OperationRequestPartFactory

java.lang.Object
org.springframework.restdocs.operation.OperationRequestPartFactory

public class OperationRequestPartFactory extends Object
A factory for creating OperationRequestParts.
Author:
Andy Wilkinson
  • Constructor Details

    • OperationRequestPartFactory

      public OperationRequestPartFactory()
  • Method Details

    • create

      public OperationRequestPart create(String name, String submittedFileName, byte[] content, org.springframework.http.HttpHeaders headers)
      Creates a new OperationRequestPart. The given headers will be augmented to ensure that they always include a Content-Length header if the part has any content.
      Parameters:
      name - the name of the part
      submittedFileName - the name of the file being submitted by the part
      content - the content of the part
      headers - the headers of the part
      Returns:
      the OperationRequestPart