acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
get.h
1//
2// nano_http_response.hpp
3// acme
4//
5// Created by Camilo Sasuke Thomas Borregaard Sørensen on 26/07/2023 23:35
6// Copyright © 2023 Camilo Sasuke Tsumanuma. All rights reserved.
7//
8#pragma once
9
10
11#include "acme/platform/transport_payload.h"
12
13
14namespace nano
15{
16
17
18 namespace http
19 {
20
21
22 class CLASS_DECL_ACME get :
23 virtual public ::transport_payload < get >,
24 virtual public ::property_object
25 {
26 public:
27
28
29 ::e_status m_estatusRet;
30
31 ::url::url m_url;
32
33 ::string m_strUserAgent;
34
35 //::property_set m_setIn;
36
37 //::property_set m_setOut;
38
39 //::property_set m_setPost;
40 //::property_set m_setHeaders;
41
42
43 //memory m_memory;
44
45 transfer_progress_function m_transferprogressfunction;
46
47
48 get();
49
50 ~get() override;
51
52 auto& url() {return m_url; }
53
54 virtual void set_out_header(const ::scoped_string & scopedstrKey, const ::scoped_string & scopedstrPayload);
55 //virtual void set_out_headers(const ::scoped_string & scopedstrOutHeaders);
56
57 virtual void set_response(long http_status, const void * data, long size);
58 virtual void append_response(const void * data, long size);
59 virtual void set_status(long http_status);
60
61 virtual bool only_headers() const;
62
63 virtual get * this_transport_payload() override;
64
65 virtual void run() override;
66 void want_memory_response(memory_base * pusermessage = nullptr);
67 void want_string_response();
68 bool does_want_memory_response();
69
70 memory_pointer get_memory_response();
71 string get_string_response();
72
73 };
74
75
76 } //namespace http
77
78
79} // namespace nano
80
81
Definition e_status.h:30
Definition memory_base.h:92
Definition url.h:435