-
Notifications
You must be signed in to change notification settings - Fork 2
Description
As discussed here. I added support for returning the http version information in PR #37 , but there's no way (that I can see in the low-level reqwest crate) to get the full first line of the response, which includes the reason phrase (like "OK"). Apparently (from the little research I've done) HTTP/2 doesn't support reason phrases at all.
Here's how far I've gotten (you'll note that the reqwest version is missing the "OK" reason phrase):
Where should we go from here?
Will this be acceptable for most users?
I have to think that most users will care more about the status code and now that we're outputting that directly in each of the HTTP method VIs, that'll be a significant help. Side note: I should probably also work to plug this into the JKI HTTP REST Client too, to see if it'll work with the reqwest plugin, right "out of the box".
Should we try to simulate the reason phrase?
This feels like a slippery slope -- it's easy to just add "OK" when the status code is 200 but I'm sure it'll get a lot more complicated. Is it better to simply not support the reason phrase (and break someone's code) than to do a "somewhat simulated" job of it? If their code breaks because of this, then they can just use the status code which will be much less brittle for them.
I'm leaning toward NOT including the reason phrase and seeing if anyone complains that it's actually needed.