docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C++ API
1.4.0
Toggle main menu visibility
Loading...
Searching...
No Matches
NetworkRequest.h
Go to the documentation of this file.
1
/**************************************************************************************************
2
* This file is a part of Ultralight. *
3
* *
4
* See <https://ultralig.ht> for licensing and more. *
5
* *
6
* (C) 2024 Ultralight, Inc. *
7
**************************************************************************************************/
8
#pragma once
9
#include <
Ultralight/Defines.h
>
10
11
namespace
ultralight
{
12
13
///
14
/// @brief Interface for Network requests.
15
///
16
class
UExport
NetworkRequest
{
17
public
:
18
virtual
~NetworkRequest
() { }
19
20
///
21
/// URL of the request.
22
///
23
virtual
String
url
()
const
= 0;
24
25
///
26
/// The host portion of the URL.
27
///
28
virtual
String
urlHost
()
const
= 0;
29
30
///
31
/// The protocol of the URL (eg, "http")
32
///
33
virtual
String
urlProtocol
()
const
= 0;
34
35
///
36
/// The HTTP method (eg, "POST" or "GET")
37
///
38
virtual
String
httpMethod
()
const
= 0;
39
40
///
41
/// The origin of the request.
42
///
43
virtual
String
httpOrigin
()
const
= 0;
44
45
///
46
/// The user-agent of the request.
47
///
48
virtual
String
httpUserAgent
()
const
= 0;
49
50
///
51
/// Enforce additional TLS/SSL certificate validation by verifying the
52
/// server's pinned public key.
53
///
54
/// The public key string can be any number of base64 encoded sha256 hashes
55
/// preceded by "sha256//" and separated by ";".
56
///
57
/// For more info see the cURL docs:
58
/// <https://curl.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html>
59
///
60
virtual
void
EnforcePinnedPublicKey
(
const
String
& public_key) = 0;
61
};
62
63
}
// namespace ultralight
UExport
#define UExport
Definition
Exports.h:25
Defines.h
ultralight::NetworkRequest
Interface for Network requests.
Definition
NetworkRequest.h:16
ultralight::NetworkRequest::httpMethod
virtual String httpMethod() const =0
The HTTP method (eg, "POST" or "GET").
ultralight::NetworkRequest::EnforcePinnedPublicKey
virtual void EnforcePinnedPublicKey(const String &public_key)=0
Enforce additional TLS/SSL certificate validation by verifying the server's pinned public key.
ultralight::NetworkRequest::urlHost
virtual String urlHost() const =0
The host portion of the URL.
ultralight::NetworkRequest::url
virtual String url() const =0
URL of the request.
ultralight::NetworkRequest::httpOrigin
virtual String httpOrigin() const =0
The origin of the request.
ultralight::NetworkRequest::urlProtocol
virtual String urlProtocol() const =0
The protocol of the URL (eg, "http").
ultralight::NetworkRequest::httpUserAgent
virtual String httpUserAgent() const =0
The user-agent of the request.
ultralight::NetworkRequest::~NetworkRequest
virtual ~NetworkRequest()
Definition
NetworkRequest.h:18
ultralight::String
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition
String.h:34
ultralight
Definition
Bitmap.h:14
Ultralight
NetworkRequest.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4