acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
http.h
1
//
2
// nano_http.hpp
3
// acme
4
//
5
// Created by Camilo Sasuke Thomas Borregaard Sørensen on 26/07/2023 22:01
6
// Copyright © 2023 Camilo Sasuke Tsumanuma. All rights reserved.
7
//
8
#pragma once
9
10
11
#include "acme/platform/http.h"
12
#include "get.h"
13
14
15
namespace
nano
16
{
17
18
19
namespace
http
20
{
21
22
23
class
CLASS_DECL_ACME http :
24
virtual
public
::platform::http
25
{
26
public
:
27
28
29
http();
30
~http()
override
;
31
32
33
inline
static
const_char_pointer represented_component_name()
34
{
35
36
return
"nano_http"
;
37
38
}
39
40
41
//virtual void sync(::nano::http::get * defer_get);
42
//
43
//
44
//virtual void async(::nano::http::get * defer_get);
45
46
virtual
void
perform(
::nano::http::get
* pnanohttpget)
override
;
47
48
49
// Follow redirects and find final resource.
50
virtual ::url::url get_effective_url(const ::url::url & url, ::property_set & set)
override
;
51
52
virtual
bool
check_url_ok(const ::url::url & url, ::property_set & set);
53
54
virtual ::string get(const ::url::url & url, ::property_set & set);
55
56
virtual ::memory as_memory(const ::url::url & url, ::property_set & set);
57
58
void
download(const ::payload& payloadFile, const ::url::url& url, ::property_set & set,
59
const
class ::time& timeTimeout = 5_h)
override
;
60
virtual
void
download(const ::file::path & pathFile, const ::url::url & url, ::property_set & set);
61
62
};
63
64
65
}
// namespace http
66
67
68
}
// namespace nano
69
70
71
nano::http::get
Definition
get.h:25
platform::http
Definition
http.h:22
nano
http
http.h
Generated by
1.17.0