Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
RequestBuilder.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace Bedrock::Http { class HeaderCollection; }
8namespace Bedrock::Http { class Response; }
9namespace Bedrock::Http::Internal { class IRequestBody; }
10namespace Core { class Path; }
11namespace Json { class Value; }
12// clang-format on
13
14namespace Bedrock::Http {
15
16class RequestBuilder {
17public:
18 // member variables
19 // NOLINTBEGIN
22 // NOLINTEND
23
24public:
25 // prevent constructor by default
26 RequestBuilder& operator=(RequestBuilder const&);
27 RequestBuilder(RequestBuilder const&);
28 RequestBuilder();
29
30public:
31 // member functions
32 // NOLINTBEGIN
33#ifdef LL_PLAT_C
34 MCNAPI ::Bedrock::Http::RequestBuilder& addHeaders(::Bedrock::Http::HeaderCollection headers);
35
36 MCNAPI ::Bedrock::Http::RequestBuilder& body(::gsl::span<uchar> const& binaryData);
37
38 MCNAPI ::Bedrock::Http::RequestBuilder&
39 body(::gsl::not_null<::std::shared_ptr<::Bedrock::Http::Internal::IRequestBody>> body);
40
41 MCNAPI ::Bedrock::Http::RequestBuilder& body(::Core::Path const& file);
42
43 MCNAPI ::Bedrock::Http::RequestBuilder& body(::Json::Value const& json);
44#endif
45
46 MCNAPI ::Bedrock::Http::RequestBuilder& body(::std::string const& plainText);
47
48#ifdef LL_PLAT_C
49 MCNAPI ::Bedrock::Http::RequestBuilder& contentType(::std::string const& contentType);
50
51 MCNAPI ::Bedrock::Http::RequestBuilder&
52 retryPolicy(::std::function<::std::optional<::std::chrono::seconds>(::Bedrock::Http::Response const&)>&& policy);
53#endif
54
55 MCNAPI ::Bedrock::Http::RequestBuilder& url(::std::string const& url);
56
58 // NOLINTEND
59
60public:
61 // destructor thunk
62 // NOLINTBEGIN
63 MCNAPI void $dtor();
64 // NOLINTEND
65};
66
67} // namespace Bedrock::Http
Definition HeaderCollection.h:7
Definition IRequestBody.h:7
MCAPI::Bedrock::Http::RequestBuilder & body(::std::string const &plainText)
MCAPI::Bedrock::Http::RequestBuilder & url(::std::string const &url)
Definition Response.h:17
Definition Path.h:10
Definition Value.h:16
Definition Alias.h:14