1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-02-17 15:55:20 -05:00
polybar/include/utils/http.hpp

24 lines
477 B
C++
Raw Normal View History

#pragma once
#include "common.hpp"
2022-03-06 17:44:48 +01:00
#include "utils/mixins.hpp"
POLYBAR_NS
2022-03-06 17:44:48 +01:00
class http_downloader : public non_copyable_mixin, public non_movable_mixin {
public:
http_downloader(int connection_timeout = 5);
~http_downloader();
string get(const string& url, const string& user = "", const string& password = "");
long response_code();
protected:
static size_t write(void* p, size_t size, size_t bytes, void* stream);
private:
void* m_curl;
};
POLYBAR_NS_END