Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Support []byte #29

Open
jadbox opened this issue May 24, 2016 · 2 comments
Open

Support []byte #29

jadbox opened this issue May 24, 2016 · 2 comments

Comments

@jadbox
Copy link

jadbox commented May 24, 2016

It would be great to support byte arrays to pass in the user_agent and get user agent sections as bytes. This would help using fasthttp with this library for performance.

@mssola mssola added this to the v1.0 release milestone Aug 31, 2017
@pierrre
Copy link

pierrre commented Nov 20, 2018

You can convert the []byte to string, or use unsafe.

@jadbox
Copy link
Author

jadbox commented Nov 20, 2018

The former cost performance and the later is a bit dirty. If it must be done in an unsafe way, I'd recommended doing the unsafe cast inside the lib instead of requiring clients to do the cast.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants