Ver código fonte

add make install

hewei 6 anos atrás
pai
commit
c78cbc29c1
4 arquivos alterados com 6 adições e 8 exclusões
  1. 0 2
      .gitignore
  2. 2 2
      README.md
  3. 2 2
      html/downloads/README.md
  4. 2 2
      http/server/HttpServer.h

+ 0 - 2
.gitignore

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

+ 2 - 2
README.md

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

+ 2 - 2
html/downloads/README.md

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

+ 2 - 2
http/server/HttpServer.h

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