Function pact_mock_server_ffi::with_multipart_file [−][src]
#[no_mangle] pub extern "C" fn with_multipart_file(
interaction: InteractionHandle,
part: InteractionPart,
content_type: *const c_char,
file: *const c_char,
part_name: *const c_char
) -> StringResult
Expand description
Adds a binary file as the body as a MIME multipart with the expected content type and example contents. Will use a mime type matcher to match the body. Returns an error if the interaction or Pact can’t be modified (i.e. the mock server for it has already started)
interaction
- Interaction handle to set the body for.part
- Request or response part.content_type
- Expected content type of the file.file
- path to the example filepart_name
- name for the mime part