Skip to content

Structures

SMJSGaming edited this page Sep 14, 2024 · 6 revisions

Structures

All structures are defined in the proxy namespace.

ProxyEvent

Abstract

ProxyEvent::getInfo()

HttpInfo* getInfo() const;

ProxyEvent::getRequest()

HttpInfo::Request getRequest() const

RequestEvent

Extends ProxyEvent

Sent upon the evoking of a request event listener.

RequestEvent::getInfo() = ProxyEvent::getInfo

RequestEvent::getRequest() = ProxyEvent::getRequest

ResponseEvent

Extends ProxyEvent

Sent upon the evoking of a response event listener.

ResponseEvent::getInfo() = ProxyEvent::getInfo

ResponseEvent::getRequest() = ProxyEvent::getRequest

ResponseEvent::getResponse()

HttpInfo::Response getResponse() const

ProxyFilter

Abstract

ProxyFilter::ProxyFilter()

ProxyFilter(const enums::OriginFilter origin = OriginFilter::ALL_FILTER)
ProxyFilter(const std::vector<std::string>& urlParts)

RequestFilter

Extends ProxyFilter

RequestFilter::RequestFilter() = ProxyFilter::ProxyFilter

ResponseFilter

Extends ProxyFilter

ResponseFilter::ResponseFilter() = ProxyFilter::ProxyFilter

HttpInfo

HttpInfo::cancel()

Cancels the request if it hasn't finished yet.

void cancel() const

HttpInfo::isPaused()

Checks if the request is paused by the proxy.

bool isPaused() const

HttpInfo::isInProgress()

Checks if the request is still in progress.

bool isInProgress() const

HttpInfo::isCompleted()

Checks if the request has completed.

bool isCompleted() const

HttpInfo::isFaulty()

Checks if the request returned an error.

bool isFaulty() const

HttpInfo::isCancelled()

Checks if the request has been cancelled by either the proxy or the original requester.

bool isCancelled() const

HttpInfo::isRepeat()

Checks if the request is a repeat of a previous request by making use of the send button in the GDIntercept menu.

bool isRepeat() const

HttpInfo::responseReceived()

Checks if the response has been received.

void responseReceived() const

HttpInfo::getID()

size_t getID() const

HttpInfo::getState()

enums::State getState() const

HttpInfo::getRequest()

HttpInfo::Request getRequest() const

HttpInfo::getResponse()

HttpInfo::Response getResponse() const

HttpInfo::HttpContent

HttpInfo::HttpContent::type

HttpInfo::ContentType type

HttpInfo::HttpContent::contents

std::string contents

HttpInfo::URL

HttpInfo::URL::stringifyProtocol()

Stringifies the protocol of the URL to one of the following:

  • HTTP
  • HTTPS
  • UNKNOWN
std::string stringifyProtocol() const

HttpInfo::URL::stringifyQuery()

Stringifies the query string of the URL to a formatted JSON string.

std::string stringifyQuery(const bool raw = false) const

HttpInfo::URL::getPortHost()

Formats the host with the port if it is not the default port for the protocol or is a localhost.

std::string getPortHost() const

HttpInfo::URL::getOrigin()

enums::Origin getOrigin() const

HttpInfo::URL::getProtocol()

enums::Protocol getProtocol() const

HttpInfo::URL::getMethod()

std::string getMethod() const

HttpInfo::URL::getOriginal()

std::string getOriginal() const

HttpInfo::URL::getQueryLess()

Gets the original URL without the query string.

std::string getQueryLess() const

HttpInfo::URL::getHost()

std::string getHost() const

HttpInfo::URL::getPort()

std::string getPort() const

HttpInfo::URL::getPath()

std::string getPath() const

HttpInfo::URL::getQuery()

nlohmann::json getQuery() const

HttpInfo::Request

HttpInfo::Request::stringifyHeaders()

Stringifies the headers of the request to a formatted JSON string.

std::string stringifyHeaders(const bool raw = false) const

HttpInfo::Request::getBodyContent()

Gets the body contents of the request.

HttpInfo::HttpContent getBodyContent(const bool raw = true) const

HttpInfo::Request::getURL()

HttpInfo::URL getURL() const

HttpInfo::Request::getHeaders()

nlohmann::json getHeaders() const

HttpInfo::Request::getBody()

std::string getBody() const

HttpInfo::Request::getContentType()

enums::ContentType getContentType() const

HttpInfo::Response

HttpInfo::Response::stringifyHeaders()

Stringifies the headers of the response to a formatted JSON string.

std::string stringifyHeaders(const bool raw = false) const

HttpInfo::Response::stringifyStatusCode()

Stringifies the status code of the response to either the integer code or one of the following error codes:

  • No response available yet (0)
  • Request Error (-1)
  • Request Timeout (-2)
  • Request Cancelled (-3)
std::string stringifyStatusCode() const

HttpInfo::Response::getResponseContent()

Gets the response contents of the request.

HttpInfo::HttpContent getResponseContent(const bool raw = true) const

HttpInfo::Response::received()

Checks if the response has been received.

bool received() const

HttpInfo::Response::getHeaders()

nlohmann::json getHeaders() const

HttpInfo::Response::getStatusCode()

int getStatusCode() const

HttpInfo::Response::getResponse()

std::string getResponse() const

HttpInfo::Response::getContentType()

enums::ContentType getContentType() const
Clone this wiki locally