LeviLamina
Loading...
Searching...
No Matches
RequestBuilder.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/http/RequestPriority.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace Bedrock::Http { class Method; }
11namespace Bedrock::Http { class Request; }
12namespace Bedrock::Http { class Response; }
13namespace Bedrock::Http::Internal { class IRequestBody; }
14namespace Core { class Path; }
15namespace Json { class Value; }
16// clang-format on
17
18namespace Bedrock::Http {
19
20class RequestBuilder {
21public:
22 // member variables
23 // NOLINTBEGIN
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 RequestBuilder& operator=(RequestBuilder const&);
31 RequestBuilder(RequestBuilder const&);
32
33public:
34 // member functions
35 // NOLINTBEGIN
36#ifdef LL_PLAT_C
37 MCNAPI ::Bedrock::Http::RequestBuilder& DEL();
38#endif
39
40 MCNAPI ::Bedrock::Http::RequestBuilder& GET();
41
42#ifdef LL_PLAT_C
43 MCNAPI ::Bedrock::Http::RequestBuilder& HEAD();
44#endif
45
46 MCNAPI ::Bedrock::Http::RequestBuilder& POST();
47
48#ifdef LL_PLAT_C
49 MCNAPI ::Bedrock::Http::RequestBuilder& PUT();
50#endif
51
53
54 MCNAPI ::Bedrock::Http::RequestBuilder&
55 addHeader(::std::string const& header, ::std::string const& value, bool ignoreRestrictedHeaderCheck);
56
57#ifdef LL_PLAT_C
58 MCNAPI ::Bedrock::Http::RequestBuilder& body(::gsl::span<uchar> const& binaryData);
59
60 MCNAPI ::Bedrock::Http::RequestBuilder&
61 body(::gsl::not_null<::std::shared_ptr<::Bedrock::Http::Internal::IRequestBody>> body);
62
63 MCNAPI ::Bedrock::Http::RequestBuilder& body(::Core::Path const& file);
64
65 MCNAPI ::Bedrock::Http::RequestBuilder& body(::Json::Value const& json);
66#endif
67
68 MCNAPI ::Bedrock::Http::RequestBuilder& body(::std::string const& plainText);
69
70 MCNAPI ::Bedrock::Http::Request& build();
71
72#ifdef LL_PLAT_C
73 MCNAPI ::Bedrock::Http::RequestBuilder& contentType(::std::string const& contentType);
74#endif
75
76 MCNAPI ::Bedrock::Http::RequestBuilder& method(::Bedrock::Http::Method method);
77
78 MCNAPI ::Bedrock::Http::RequestBuilder& priority(::Bedrock::Http::RequestPriority priority);
79
80#ifdef LL_PLAT_C
81 MCNAPI ::Bedrock::Http::RequestBuilder&
82 retryPolicy(::std::function<::std::optional<::std::chrono::seconds>(::Bedrock::Http::Response const&)>&& policy);
83#endif
84
85 MCNAPI ::Bedrock::Http::RequestBuilder& timeout(::std::chrono::seconds timeout);
86
87 MCNAPI ::Bedrock::Http::RequestBuilder& url(::std::string const& url);
88
90 // NOLINTEND
91
92public:
93 // constructor thunks
94 // NOLINTBEGIN
95 MCNAPI void* $ctor();
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCNAPI void $dtor();
102 // NOLINTEND
103};
104
105} // namespace Bedrock::Http
Definition IRequestBody.h:7
Definition Method.h:7
MCAPI::Bedrock::Http::RequestBuilder & priority(::Bedrock::Http::RequestPriority priority)
MCAPI::Bedrock::Http::RequestBuilder & timeout(::std::chrono::seconds timeout)
MCAPI::Bedrock::Http::RequestBuilder & method(::Bedrock::Http::Method method)
MCAPI::Bedrock::Http::RequestBuilder & body(::std::string const &plainText)
MCAPI::Bedrock::Http::RequestBuilder & POST()
MCAPI::Bedrock::Http::Request & build()
MCAPI::Bedrock::Http::RequestBuilder & url(::std::string const &url)
MCAPI::Bedrock::Http::RequestBuilder & GET()
MCAPI::Bedrock::Http::RequestBuilder & addHeader(::std::string const &header, ::std::string const &value, bool ignoreRestrictedHeaderCheck)
Definition Request.h:22
Definition Response.h:7
Definition Path.h:12
Definition Value.h:16
Definition Alias.h:14