Open sosthene-nitrokey opened 2 weeks ago
Is force_send_body
an alternative here? Ideally I'd like to not pollute the API with "useless" functions.
It is. But it seems a bit weird to use it for that.
Another possibility would be to rename send_empty
to call()
.
What about renaming force_send_body
to something like erase_typestate
(or similar) and introduce a new state Any
, that has a single API? I think it would be entirely a surface change.
While it is nice to have the type safety when creating requests, the distinction when creating a GET request without a body and a POST request without a body makes it harder when using code generation such as OpenAPI.