Function pact_mock_server_ffi::with_body[][src]

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

Adds the body for the interaction. Returns false if the interaction or Pact can’t be modified (i.e. the mock server for it has already started)

  • 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.