NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
neforce::http::http_method结构体 参考

HTTP方法定义 更多...

#include <http_constants.hpp>

类 neforce::http::http_method 继承关系图:
[图例]

Public 成员函数

 http_method (http_method &&other) noexcept
 移动构造函数
http_method & operator= (http_method &&other) noexcept
 移动赋值运算符
 http_method (const string &method)
 左值字符串构造函数
http_method & operator= (const string &method)
 左值字符串赋值运算符
 http_method (string &&method)
 右值字符串构造函数
http_method & operator= (string &&method)
 右值字符串赋值运算符
const stringmethod () const &noexcept
 获取左值方法
string method () &&noexcept
 获取右值方法
http_method operator& (const http_method &rhs) const &
 方法组合操作符
string to_string () const
 转换为字符串
Public 成员函数 继承自 neforce::istringify< http_method >
constexpr string to_string () const
 转换为字符串

静态 Public 成员函数

static const http_method & GET ()
 GET方法
static const http_method & POST ()
 POST方法
static const http_method & HEAD ()
 HEAD方法
static const http_method & PUT ()
 PUT方法
static const http_method & DELETE ()
 DELETE方法
static const http_method & OPTIONS ()
 OPTIONS方法
static const http_method & TRACE ()
 TRACE方法
static const http_method & CONNECT ()
 CONNECT方法
static const http_method & PATCH ()
 PATCH方法
static const http_method & DEFAULT ()
 默认方法

详细描述

HTTP方法定义

定义了标准的HTTP请求方法,支持方法组合操作。

在文件 http_constants.hpp620 行定义.

构造及析构函数说明

◆ http_method() [1/3]

neforce::http::http_method::http_method ( http_method && other)
inlinenoexcept

移动构造函数

参数
other源对象

在文件 http_constants.hpp633 行定义.

◆ http_method() [2/3]

neforce::http::http_method::http_method ( const string & method)
inlineexplicit

左值字符串构造函数

参数
methodHTTP方法字符串

在文件 http_constants.hpp653 行定义.

引用了 method().

◆ http_method() [3/3]

neforce::http::http_method::http_method ( string && method)
inlineexplicit

右值字符串构造函数

参数
methodHTTP方法字符串

在文件 http_constants.hpp670 行定义.

引用了 method() , 以及 neforce::move().

成员函数说明

◆ method() [1/2]

string neforce::http::http_method::method ( ) &&
inlinenodiscardnoexcept

获取右值方法

返回
方法字符串

在文件 http_constants.hpp706 行定义.

引用了 neforce::move().

◆ method() [2/2]

const string & neforce::http::http_method::method ( ) const &
inlinenodiscardnoexcept

获取左值方法

返回
方法字符串引用

在文件 http_constants.hpp700 行定义.

被这些函数引用 http_method(), http_method(), operator=() , 以及 operator=().

◆ operator&()

http_method neforce::http::http_method::operator& ( const http_method & rhs) const &
inlinenodiscard

方法组合操作符

参数
rhs右侧方法
返回
组合后的方法(使用逗号分隔)

用于表示允许多种方法的场景,如"GET, POST"

在文件 http_constants.hpp715 行定义.

◆ operator=() [1/3]

http_method & neforce::http::http_method::operator= ( const string & method)
inline

左值字符串赋值运算符

参数
methodHTTP方法字符串
返回
自身引用

在文件 http_constants.hpp661 行定义.

引用了 method().

◆ operator=() [2/3]

http_method & neforce::http::http_method::operator= ( http_method && other)
inlinenoexcept

移动赋值运算符

参数
other源对象
返回
自身引用

在文件 http_constants.hpp641 行定义.

引用了 neforce::addressof() , 以及 neforce::move().

◆ operator=() [3/3]

http_method & neforce::http::http_method::operator= ( string && method)
inline

右值字符串赋值运算符

参数
methodHTTP方法字符串
返回
自身引用

在文件 http_constants.hpp678 行定义.

引用了 method() , 以及 neforce::move().

◆ to_string()

string neforce::http::http_method::to_string ( ) const
inlinenodiscard

转换为字符串

返回
方法字符串

在文件 http_constants.hpp745 行定义.


该结构体的文档由以下文件生成: