Mercurial > minori
annotate include/core/http.h @ 187:9613d72b097e
*: multiple performance improvements
like marking `static const` when it makes sense...
date: change old stupid heap-based method to a structure which should
make copying the thing actually make a copy.
also many performance-based changes, like removing the std::tie
dependency and forward-declaring nlohmann json
*: replace every instance of QString::fromUtf8 to Strings::ToQString.
the main difference is that our function will always convert exactly
what is in the string, while some other times it would only convert
up to the nearest NUL byte
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 06 Dec 2023 13:43:54 -0500 |
parents | f5940a575d83 |
children | 2f5a9247e501 |
rev | line source |
---|---|
75 | 1 #ifndef __core__http_h |
2 #define __core__http_h | |
3 | |
77 | 4 #include <QByteArray> |
75 | 5 #include <string> |
6 #include <vector> | |
7 | |
8 namespace HTTP { | |
9 | |
100
f5940a575d83
track/constants: add many more video formats
Paper <mrpapersonic@gmail.com>
parents:
77
diff
changeset
|
10 QByteArray Get(const std::string& url, const std::vector<std::string>& headers = {}); |
f5940a575d83
track/constants: add many more video formats
Paper <mrpapersonic@gmail.com>
parents:
77
diff
changeset
|
11 QByteArray Post(const std::string& url, const std::string& data, const std::vector<std::string>& headers = {}); |
75 | 12 |
76 | 13 } // namespace HTTP |
75 | 14 |
15 #endif // __core__http_h |