Skip to content
Download

Method

mach::Method

Represents an HTTP request method.

Primary header:

#include <mach/http/Method.hpp>

Convenience header:

#include <mach/mach.hpp>
enum class Method {
Get,
Post,
Put,
Patch,
Delete,
Head,
Options,
Unknown
};
Name Description
Get The HTTP GET method.
Post The HTTP POST method.
Put The HTTP PUT method.
Delete The HTTP DELETE method.
Patch The HTTP PATCH method.
Head The HTTP HEAD method.
Options The HTTP OPTIONS method. Currently not supported by Mach.
Unknown An unknown or unsupported HTTP method.
Function Description
toString Converts a Method to its string representation.
Name Description
allMethods Contains all HTTP methods supported by Mach.

The Options enumerator is defined for completeness, but Mach does not currently support HTTP OPTIONS requests.

Name Description
Request Represents the current HTTP request.