Skip to content

Add methods for creating a PUT and DELETE request #72

@pintariching

Description

@pintariching

Currently the Request struct only has methods for GET and POST. I think it would make sense to add also the PUT and DELETE. Up to version 0.5.0, I generated them by hand like for example:

let req = ehttp::Request {
    method: "PUT".to_string(),
    url: put_url,,
    body: json,
    headers: ehttp::Headers::new(&[("Content-Type", "application/json")]),
};

In the version 0.6.0 I see two new fields mode and timeout were added. however the ehttp::type module is private and the Request struct can't be constructed outside of the ehttp crate.

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