Photon 1.0.0
Loading...
Searching...
No Matches
IURLLoader.hpp
Go to the documentation of this file.
1/*
2 * =====================================================================
3 *
4 * Photon
5 * Copyright Amlal EL Mahrouss, all rights reserved.
6 *
7 * =====================================================================
8 */
9
10#pragma once
11
12#include <IHTTPProtocol.hpp>
13#include <URL.hpp>
14
15#define PHOTON_URL_PROTO "HTTP"
16
17namespace Photon
18{
19 /*
20 * @brief IURLLoader
21 * @brief Interface for loading HTTP/HTTPS urls, this is the base class for loading stuff as well.
22 */
23
25 {
26 public:
27 IURLLoader() = default;
28 virtual ~IURLLoader() = default;
29
30 public:
32
33 public:
34 virtual String post(URL& url, String data, bool cache_data = false);
35 virtual String put(URL& url, String data, bool cache_data = false);
36 virtual String del(URL& url, String data, bool cache_data = false);
37 virtual String get(URL& url, bool cache_data = false);
38 virtual void set_endpoint(const String& endpoint) noexcept;
39 virtual String get_endpoint() noexcept;
40 virtual String get_protocol() noexcept;
41
42 protected:
44 String mEndpoint;
45 };
46} // namespace Photon
Definition IURLLoader.hpp:25
IURLLoader()=default
PHOTON_COPY_DEFAULT(IURLLoader)
virtual ~IURLLoader()=default
Definition URL.hpp:44
#define PHOTON_API
Definition Config.hpp:64
This file is also about defining core js concepts.
Definition BasePhotonWindow.hpp:22
std::string String
Definition Core.hpp:37
Definition format.h:1901
del
Definition tag_strings.h:73