You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the documentation at readthedocs and the issue is not addressed there.
I have tested that the issue is present in current master branch (aka latest git).
I have searched the issue tracker for a similar issue.
If there is a stack dump, I have decoded it.
I have filled out all fields below.
Problem Description
We store our fixed size data in std::array<char, SIZE>. This brings a few problems when dealing with APIs that only receive a starting char pointer, but not the length. So we endup having to allocate a string just so we have a null-terminated string to pass to those APIs.
With HttpClient::setAuthorization this means we have to allocate twice. I'm here asking for support for non-null terminated views as first class. Be it by passing the size, or a String to be moved, so we control the string allocation.
The text was updated successfully, but these errors were encountered:
paulocsanz
changed the title
HTTPClient::setAuthorization doesn't support non-null terminated string views
HTTPClient::setAuthorization needs two allocations to support non-null terminated string views
Jul 18, 2021
Basic Infos
Problem Description
We store our fixed size data in std::array<char, SIZE>. This brings a few problems when dealing with APIs that only receive a starting char pointer, but not the length. So we endup having to allocate a string just so we have a null-terminated string to pass to those APIs.
With HttpClient::setAuthorization this means we have to allocate twice. I'm here asking for support for non-null terminated views as first class. Be it by passing the size, or a String to be moved, so we control the string allocation.
The text was updated successfully, but these errors were encountered: