1
0
hewei 6 жил өмнө
parent
commit
c78cbc29c1

+ 0 - 2
.gitignore

@@ -29,8 +29,6 @@ bin
 dist
 dist
 build
 build
 
 
-hconfig.h
-
 # test
 # test
 test
 test
 
 

+ 2 - 2
README.md

@@ -32,7 +32,7 @@ but simpler apis and richer protocols.
 ### http
 ### http
 see examples/httpd.cpp
 see examples/httpd.cpp
 ```
 ```
-#include "http_server.h"
+#include "HttpServer.h"
 
 
 int http_api_hello(HttpRequest* req, HttpResponse* res) {
 int http_api_hello(HttpRequest* req, HttpResponse* res) {
     res->body = "hello";
     res->body = "hello";
@@ -42,7 +42,7 @@ int http_api_hello(HttpRequest* req, HttpResponse* res) {
 int main() {
 int main() {
     HttpService service;
     HttpService service;
     service.base_url = "/v1/api";
     service.base_url = "/v1/api";
-    service.AddApi("/hello", http_api_hello);
+    service.AddApi("/hello", HTTP_GET, http_api_hello);
 
 
     http_server_t server;
     http_server_t server;
     server.port = 8080;
     server.port = 8080;

+ 2 - 2
html/downloads/README.md

@@ -32,7 +32,7 @@ but simpler apis and richer protocols.
 ### http
 ### http
 see examples/httpd.cpp
 see examples/httpd.cpp
 ```
 ```
-#include "http_server.h"
+#include "HttpServer.h"
 
 
 int http_api_hello(HttpRequest* req, HttpResponse* res) {
 int http_api_hello(HttpRequest* req, HttpResponse* res) {
     res->body = "hello";
     res->body = "hello";
@@ -42,7 +42,7 @@ int http_api_hello(HttpRequest* req, HttpResponse* res) {
 int main() {
 int main() {
     HttpService service;
     HttpService service;
     service.base_url = "/v1/api";
     service.base_url = "/v1/api";
-    service.AddApi("/hello", http_api_hello);
+    service.AddApi("/hello", HTTP_GET, http_api_hello);
 
 
     http_server_t server;
     http_server_t server;
     server.port = 8080;
     server.port = 8080;

+ 2 - 2
http/server/HttpServer.h

@@ -31,7 +31,7 @@ typedef struct http_server_s {
 } http_server_t;
 } http_server_t;
 
 
 /*
 /*
-#include "http_server.h"
+#include "HttpServer.h"
 
 
 int http_api_hello(HttpRequest* req, HttpResponse* res) {
 int http_api_hello(HttpRequest* req, HttpResponse* res) {
     res->body = "hello";
     res->body = "hello";
@@ -41,7 +41,7 @@ int http_api_hello(HttpRequest* req, HttpResponse* res) {
 int main() {
 int main() {
     HttpService service;
     HttpService service;
     service.base_url = "/v1/api";
     service.base_url = "/v1/api";
-    service.AddApi("/hello", http_api_hello);
+    service.AddApi("/hello", HTTP_GET, http_api_hello);
 
 
     http_server_t server;
     http_server_t server;
     server.port = 8080;
     server.port = 8080;