Thoth
A functional, expressive, asynchronous C++26 webdev library
Loading...
Searching...
No Matches
ResponseHeaders.hpp
Go to the documentation of this file.
1#pragma once
4
5namespace Thoth::Http {
6 // based in Microslop's HttpResponseHeaders
8
9#pragma region Response Specific Proxies
10
14
15
20
25
30
31
36
37 // //! @brief Gets or sets the value of the Cache-Control header for an HTTP response.
38 // NHeaders::ValueProxy<false, bool> CacheControl();
39 // //! @copybrief CacheControl
40 // [[nodiscard]] NHeaders::ValueProxy<true, bool> CacheControl() const;
41
46
48 NHeaders::ValueProxy<false, std::string> Location(); // TODO: Improve Url before change the type
51
52 // //! @brief Gets a view of the contents of this headers collection that does not parse nor validate the data upon access.
53 // NHeaders::ValueProxy<false, bool> NonValidated();
54 // //! @copybrief NonValidated
55 // [[nodiscard]] NHeaders::ValueProxy<true, bool> NonValidated() const;
56
61
66
71
72 // TODO: I dont know if I will implement this
73 // //! @brief Gets the value of the Trailer header for an HTTP response.
74 // NHeaders::ValueProxy<false, bool> Trailer();
75 // //! @copybrief Trailer
76 // [[nodiscard]] NHeaders::ValueProxy<true, bool> Trailer() const;
77
78
83
84
89
91
92#pragma endregion
93 };
94}
Definition Client.hpp:12
This class stores the headers from HTTP.
Definition Headers.hpp:29
Definition ListProxy.hpp:14
Definition ValueProxy.hpp:10
Definition ResponseHeaders.hpp:7
NHeaders::ValueProxy< false, NHeaders::AcceptRanges > AcceptRanges()
Defines if the response accepts bytes or no (just "bytes" or "none" is available).
NHeaders::ValueProxy< true, std::chrono::utc_clock::time_point, std::chrono::seconds > RetryAfter() const
The date or cooldown when the endpoint will accept new responses.
NHeaders::ListProxy< false, NHeaders::MimeType > AcceptPost()
The value of the Accept-Patch header.
NHeaders::ListProxy< false, NHeaders::MimeType > AcceptPatch()
The value of the Accept-Patch header.
NHeaders::ValueProxy< true, std::string > ProxyAuthenticate() const
The "proxy-authenticate" header.
NHeaders::ValueProxy< false, std::string > Server()
The type of server.
NHeaders::ValueProxy< true, NHeaders::AcceptRanges > AcceptRanges() const
Defines if the response accepts bytes or no (just "bytes" or "none" is available).
NHeaders::ValueProxy< true, std::string > Location() const
The URL where this response pointers to.
NHeaders::ValueProxy< false, std::string > Location()
The URL where this response pointers to.
NHeaders::ValueProxy< true, NHeaders::EntityTag > EntityTag() const
The "ETag" header.
NHeaders::ValueProxy< true, std::string > WwwAuthenticate() const
The types of authentication that the server utilizes.
NHeaders::ListProxy< true, NHeaders::MimeType > AcceptPatch() const
The value of the Accept-Patch header.
NHeaders::ListProxy< true, NHeaders::MimeType > AcceptPost() const
The value of the Accept-Patch header.
NHeaders::ValueProxy< false, std::string > ProxyAuthenticate()
The "proxy-authenticate" header.
NHeaders::ValueProxy< false, std::chrono::utc_clock::time_point, std::chrono::seconds > RetryAfter()
The date or cooldown when the endpoint will accept new responses.
NHeaders::ValueProxy< true, std::string > Server() const
The type of server.
NHeaders::ValueProxy< false, std::chrono::seconds > Age()
Get how old this response has generated in the server, useful for caching.
NHeaders::ValueProxy< false, NHeaders::EntityTag > EntityTag()
The "ETag" header.
NHeaders::ValueProxy< true, std::chrono::seconds > Age() const
Get how old this response has generated in the server, useful for caching.
NHeaders::ValueProxy< false, std::string > WwwAuthenticate()
The types of authentication that the server utilizes.
NHeaders::ListProxy< true, std::string > Vary() const
The "vary" header.
NHeaders::ListProxy< false, std::string > Vary()
The "vary" header.