mockforge_server_stub

Function mockforge_server_stub 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn mockforge_server_stub( handle: *mut MockServerHandle, method: *const c_char, path: *const c_char, status: u16, body: *const c_char, ) -> i32
Expand description

Add a stub response to the mock server

ยงSafety

  • handle must be valid
  • method, path, and body must be valid null-terminated C strings
  • Returns 0 on success, -1 on error