[][src]Function pact_mock_server_ffi::with_body

#[no_mangle]pub extern "C" fn with_body(
    interaction: InteractionHandle,
    part: InteractionPart,
    content_type: *const c_char,
    body: *const c_char
)

Adds the body for the interaction.

  • part - The part of the interaction to add the body to (Request or Response).
  • content_type - The content type of the body. Defaults to text/plain. Will be ignored if a content type header is already set.
  • body - The body contents. For JSON payloads, matching rules can be embedded in the body.