Skip to content

add request_builder_body_binary function. #16

@Tom-McQuillan

Description

@Tom-McQuillan

The existing request_builder_body function only works with text data because it:

  • Expects a C string (*const c_char): assumes null-terminated text
  • Validates UTF-8 encoding: calls CStr::from_ptr(body).to_str() which fails on non-UTF-8 bytes
  • Rejects binary data: returns error "Body contains invalid UTF-8" when it encounters bytes like 0x00, 0xFF, etc.

What request_builder_body_binary Provides:

  • Accepts raw bytes (*const u8 + length): no assumption about text format
  • No UTF-8 validation: treats data as pure binary
  • Works with any file type: videos, images, PDFs, executables, etc.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions