elnormous / elnormous/HTTPRequest
A couple of ideas
- Dominant language
- C++
- Stars
- 970
- Forks
- 200
- PR merge metrics
- No merged PRs in 30d
Description
Your library seems very promising, but I thought I would let you know a few ideas I had while looking at it:
* Would be really great to get https support
* I'd request to avoid the use of C++ exceptions. Many C++ devs don't use them very much ([they're notoriously expensive!](https://stackoverflow.com/a/52513707/111307))
* The single header, although it looks "easier to use" at first, is really difficult to browse. Splitting the source file into multiple files is almost always the best idea.
* style nit: I feel like you're [overusing `auto`](https://github.com/elnormous/HTTPRequest/blob/44d97a57f5cab434e5205e69cf719753689d8b81/include/HTTPRequest.hpp#L504) in the code. I mean, in this case, `int` is shorter ;) The general guideline I've heard is to use `auto` where it "increases readability", very subjective :)
* There is some [extra data copy](https://github.com/elnormous/HTTPRequest/blob/44d97a57f5cab434e5205e69cf719753689d8b81/include/HTTPRequest.hpp#L1131) that could be avoided. Consider going to C-arrays/`memcpy` for passing around some of the data?
* Would be nice to have an `asyncSend` that accepts a lambda onComplete handler (something like `std::function`)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.