add qhl header file
This commit is contained in:
parent
e6fa8481e8
commit
3a8c2cf4b0
40
README.md
40
README.md
@ -765,3 +765,43 @@ index 7111f2d..09d84c2 100644
|
|||||||
-{type,app}.
|
-{type,app}.
|
||||||
{ws_url,"https://git.qpq.swiss/QPQ-AG/gex"}.
|
{ws_url,"https://git.qpq.swiss/QPQ-AG/gex"}.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Adding the QHL header file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://git.qpq.swiss/QPQ-AG/QHL/raw/branch/master/include/http.hrl -O gex_httpd/include/http.hrl
|
||||||
|
```
|
||||||
|
|
||||||
|
```diff
|
||||||
|
diff --git a/gex_httpd/include/http.hrl b/gex_httpd/include/http.hrl
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..27d24d2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/gex_httpd/include/http.hrl
|
||||||
|
@@ -0,0 +1,25 @@
|
||||||
|
+-record(request,
|
||||||
|
+ {method = undefined :: undefined | method(),
|
||||||
|
+ path = undefined :: undefined | binary(),
|
||||||
|
+ qargs = undefined :: undefined | #{Key :: binary() := Value :: binary()},
|
||||||
|
+ fragment = undefined :: undefined | none | binary(),
|
||||||
|
+ version = undefined :: undefined | http10 | http11 | http20,
|
||||||
|
+ headers = undefined :: undefined | [{Key :: binary(), Value :: binary()}],
|
||||||
|
+ cookies = undefined :: undefined | #{Key :: binary() := Value :: binary()},
|
||||||
|
+ enctype = undefined :: undefined | none | urlencoded | multipart(),
|
||||||
|
+ size = undefined :: undefined | none | non_neg_integer(),
|
||||||
|
+ body = undefined :: undefined | none | body()}).
|
||||||
|
+
|
||||||
|
+-record(response,
|
||||||
|
+ {type = page :: page | {data, string()},
|
||||||
|
+ version = http11 :: http11,
|
||||||
|
+ code = 200 :: pos_integer(),
|
||||||
|
+ slogan = "" :: string(),
|
||||||
|
+ headers = [] :: [{Key :: string(), Value :: iolist()}],
|
||||||
|
+ body = "" :: iolist()}).
|
||||||
|
+
|
||||||
|
+-type method() :: get | post | options.
|
||||||
|
+-type multipart() :: {multipart, Boundary :: binary()}.
|
||||||
|
+-type body() :: {partial, binary()} | {multipart, [body_part()]} | binary().
|
||||||
|
+-type body_part() :: {Field :: binary(), Data :: binary()}
|
||||||
|
+ | {Field :: binary(), Name :: binary(), Data :: binary()}.
|
||||||
|
```
|
||||||
|
|||||||
25
gex_httpd/include/http.hrl
Normal file
25
gex_httpd/include/http.hrl
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
-record(request,
|
||||||
|
{method = undefined :: undefined | method(),
|
||||||
|
path = undefined :: undefined | binary(),
|
||||||
|
qargs = undefined :: undefined | #{Key :: binary() := Value :: binary()},
|
||||||
|
fragment = undefined :: undefined | none | binary(),
|
||||||
|
version = undefined :: undefined | http10 | http11 | http20,
|
||||||
|
headers = undefined :: undefined | [{Key :: binary(), Value :: binary()}],
|
||||||
|
cookies = undefined :: undefined | #{Key :: binary() := Value :: binary()},
|
||||||
|
enctype = undefined :: undefined | none | urlencoded | multipart(),
|
||||||
|
size = undefined :: undefined | none | non_neg_integer(),
|
||||||
|
body = undefined :: undefined | none | body()}).
|
||||||
|
|
||||||
|
-record(response,
|
||||||
|
{type = page :: page | {data, string()},
|
||||||
|
version = http11 :: http11,
|
||||||
|
code = 200 :: pos_integer(),
|
||||||
|
slogan = "" :: string(),
|
||||||
|
headers = [] :: [{Key :: string(), Value :: iolist()}],
|
||||||
|
body = "" :: iolist()}).
|
||||||
|
|
||||||
|
-type method() :: get | post | options.
|
||||||
|
-type multipart() :: {multipart, Boundary :: binary()}.
|
||||||
|
-type body() :: {partial, binary()} | {multipart, [body_part()]} | binary().
|
||||||
|
-type body_part() :: {Field :: binary(), Data :: binary()}
|
||||||
|
| {Field :: binary(), Name :: binary(), Data :: binary()}.
|
||||||
Loading…
x
Reference in New Issue
Block a user