-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response type needs to have a different body type #16
Comments
I've found the send_bits function. Interesting because I can send a request with type string and get a response with bit_string. and visa versa. Not sure what the right answer is here. |
There's a tension between flexibility and doing what is useful in the majority of cases. For now we can case a string body to a bit string and use send_bits. What do you think? |
Hmm. I'm not sure. a dynamic string as the error is not very useful. Don't think I have any useful answers, |
I'm not sure what you mean by dynamic string? It would be a bit string which could be printed or converted to a string if valid utf8. |
currently the return type from
httpc.send
isResponse(String)
https://hexdocs.pm/gleam_httpc/gleam/httpc/#send
This has been causing me runtime errors because I can use httpc to fetch resources like images, e.g. favicons which to not have a string body. I think the correct thing to do is
Response(BitString)
The text was updated successfully, but these errors were encountered: