载入中...
搜索中...
未找到
eve::service::INetwork类 参考abstract
Minimal synchronous HTTP request surface. Providers: eve::network::Network. Mocks return canned status codes / errors, so consumers can test 404 / timeout / TLS paths without a network. 更多...
#include <ServiceInterfaces.h>
类 eve::service::INetwork 继承关系图:
Public 成员函数 | |
| virtual | ~INetwork ()=default |
| Releases INetwork resources. | |
| virtual bool | httpRequest (const std::string &method, const std::string &url, const std::string &body, int timeoutMs, int &status, std::string &responseBody)=0 |
| Performs one HTTP request synchronously. | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "INetwork" |
详细描述
Minimal synchronous HTTP request surface. Providers: eve::network::Network. Mocks return canned status codes / errors, so consumers can test 404 / timeout / TLS paths without a network.
在文件 ServiceInterfaces.h 第 42 行定义.
构造及析构函数说明
◆ ~INetwork()
|
virtualdefault |
Releases INetwork resources.
成员函数说明
◆ httpRequest()
|
pure virtual |
Performs one HTTP request synchronously.
- 参数
-
method "GET" / "POST" / ... url Full URL. body Request body (empty for GET). timeoutMs Timeout in milliseconds. [out] status HTTP status code (only meaningful when returning true). [out] responseBody Response body bytes.
- 返回
- false on transport error / timeout; true when a response arrived.
在 eve::network::Network 内被实现.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 ServiceInterfaces.h 第 44 行定义.
该类的文档由以下文件生成:
- src/engine/common/ServiceInterfaces.h