mirror-chatterino2/src/common/NetworkCommon.hpp

24 lines
423 B
C++

#pragma once
#include <functional>
class QNetworkReply;
namespace chatterino {
class Outcome;
class NetworkResult;
using NetworkSuccessCallback = std::function<Outcome(NetworkResult)>;
using NetworkErrorCallback = std::function<bool(int)>;
using NetworkReplyCreatedCallback = std::function<void(QNetworkReply *)>;
enum class NetworkRequestType {
Get,
Post,
Put,
Delete,
};
} // namespace chatterino