#[no_mangle]
pub extern "C" fn pactffi_sync_http_set_request_contents(
    interaction: *mut SynchronousHttp,
    contents: *const c_char,
    content_type: *const c_char
)
Expand description

Sets the request contents of the interaction.

  • interaction - the interaction to set the request contents for
  • contents - pointer to contents to copy from. Must be a valid NULL-terminated UTF-8 string pointer.
  • content_type - pointer to the NULL-terminated UTF-8 string containing the content type of the data.

§Safety

The request contents and content type must either be NULL pointers, or point to valid UTF-8 encoded NULL-terminated strings. Otherwise behaviour is undefined.

§Error Handling

If the contents is a NULL pointer, it will set the request contents as null. If the content type is a null pointer, or can’t be parsed, it will set the content type as unknown.