Skip to content

Feature request: CURLOPT_POSTFIELDS non-copying wrappers #630

@Pr0methean

Description

@Pr0methean

It would be handy if curl-rust provided a send_with_body wrapper around CURLOPT_POSTFIELDS that took a borrowed byte slice, and a post_fields_move that would take ownership of a boxed slice to send later. That way it would be just as convenient to move the POST body as to copy it, when using this crate with ones like serde_urlencoded that don't integrate with the Form type. (Otherwise I have to add a Cursor<Box<[u8]>> field to my Handler implementation and pass all reads through to it.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions