Skip to content

Commit

Permalink
http server apis.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlgq2 committed Aug 27, 2020
1 parent 23c3e8b commit c963af2
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions doc/en/http/HttpServer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# HttpServer
Http's server.
<br></br>
```C++
HttpServer(EventLoop* loop)
```
Constructor.
* EventLoop* loop : Event loop句柄。
<br></br>
```C++
void Get(std::string path, OnHttpReqCallback callback)
```
Set `GET` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Post(std::string path, OnHttpReqCallback callback)
```
Set `POST` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Head(std::string path, OnHttpReqCallback callback)
```
Set `HEAD` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Put(std::string path, OnHttpReqCallback callback)
```
Set `PUT` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Delete(std::string path, OnHttpReqCallback callback)
```
Set `DELETE` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Connect(std::string path, OnHttpReqCallback callback)
```
Set `CONNECT` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Options(std::string path, OnHttpReqCallback callback)
```
Set `OPTIONS` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Trace(std::string path, OnHttpReqCallback callback)
```
Set `TRACE` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.
<br></br>
```C++
void Patch(std::string path, OnHttpReqCallback callback)
```
Set `PATCH` methon callback.
* std::string path : Routing path,wildcards allowed.
* OnHttpReqCallback callback : Callback function.

0 comments on commit c963af2

Please sign in to comment.