class
#include <IO/WebRequest.h>
WebSessionBase Base class of web sessions.
Derived classes
- class WebSession
- Represents web session that allows WebRequest to be created.
- class WebSessionAsync
- Represents web session that allows WebRequestAsync to be created.
Public static functions
- static auto IsBackendAvailable() -> bool
- Returns
true
if the network backend is available and web requests can be made.
Constructors, destructors, conversion operators
- WebSessionBase()
- WebSessionBase(const WebSessionBase& other)
- ~WebSessionBase()
- operator bool() const explicit noexcept
- Whether the session was successfully opened and can be used.
Public functions
- auto operator=(const WebSessionBase& other) -> WebSessionBase&
-
void AddCommonHeader(Containers::
StringView name, Containers:: StringView value) - Sets a request header in every request created from this session after it has been set.
-
auto GetTempDirectory() const -> Containers::
String - Returns the current temporary directory.
-
void SetTempDirectory(Containers::
StringView path) - Sets the current temporary directory.
- auto SetProxy(const WebProxy& proxy) -> bool
- Sets the proxy to use for all requests initiated by this session.
- auto IsOpened() const -> bool noexcept
- Returns
true
if the session was successfully opened and can be used. - void Dispose()
- Closes the session.
- auto EnablePersistentStorage(bool enable) -> bool
- Allows to enable persistent storage for the session.
- auto GetNativeHandle() const -> WebSessionHandle noexcept
- Returns the native handle corresponding to this session object.