From f2e41fcfeca47a9dfb0adbe1d95291208c2ed05b Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Sat, 11 Oct 2025 15:43:10 +0900 Subject: [PATCH 1/3] Add ZJ dep, and fix enctype spec --- ebin/qhl.app | 2 +- include/http.hrl | 2 +- src/qhl.erl | 2 +- zomp.meta | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ebin/qhl.app b/ebin/qhl.app index be82950..ca523f1 100644 --- a/ebin/qhl.app +++ b/ebin/qhl.app @@ -3,5 +3,5 @@ {registered,[]}, {included_applications,[]}, {applications,[stdlib,kernel]}, - {vsn,"0.2.0"}, + {vsn,"0.2.1"}, {modules,[qhl]}]}. diff --git a/include/http.hrl b/include/http.hrl index 27d24d2..a4ce8ea 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -6,7 +6,7 @@ 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(), + enctype = undefined :: undefined | none | urlencoded | json | multipart(), size = undefined :: undefined | none | non_neg_integer(), body = undefined :: undefined | none | body()}). diff --git a/src/qhl.erl b/src/qhl.erl index a6c6134..f2113a9 100644 --- a/src/qhl.erl +++ b/src/qhl.erl @@ -8,7 +8,7 @@ %%% @end -module(qhl). --vsn("0.2.0"). +-vsn("0.2.1"). -author("Craig Everett "). -copyright("Craig Everett "). -license("MIT"). diff --git a/zomp.meta b/zomp.meta index 20bad0d..e16448a 100644 --- a/zomp.meta +++ b/zomp.meta @@ -2,10 +2,10 @@ {type,lib}. {modules,[]}. {prefix,none}. -{author,"Craig Everett"}. {desc,"The Quick HTTP Library"}. -{package_id,{"otpr","qhl",{0,2,0}}}. -{deps,[]}. +{author,"Craig Everett"}. +{package_id,{"otpr","qhl",{0,2,1}}}. +{deps,[{"otpr","zj",{1,1,2}}]}. {key_name,none}. {a_email,"zxq9@zxq9.com"}. {c_email,"zxq9@zxq9.com"}. From 0def0846bfe37727fe9598d06a7e9b21ba1aa632 Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Sat, 11 Oct 2025 15:45:05 +0900 Subject: [PATCH 2/3] Add map type to body (zj return) --- include/http.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/http.hrl b/include/http.hrl index a4ce8ea..7701f28 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -20,6 +20,6 @@ -type method() :: get | post | options. -type multipart() :: {multipart, Boundary :: binary()}. --type body() :: {partial, binary()} | {multipart, [body_part()]} | binary(). +-type body() :: {partial, binary()} | {multipart, [body_part()]} | binary() | map(). -type body_part() :: {Field :: binary(), Data :: binary()} | {Field :: binary(), Name :: binary(), Data :: binary()}. From faf14bac3fe223051de602eb28c952271cacbac4 Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Sat, 11 Oct 2025 15:47:04 +0900 Subject: [PATCH 3/3] Fix zj type --- include/http.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/http.hrl b/include/http.hrl index 7701f28..4f2193f 100644 --- a/include/http.hrl +++ b/include/http.hrl @@ -20,6 +20,6 @@ -type method() :: get | post | options. -type multipart() :: {multipart, Boundary :: binary()}. --type body() :: {partial, binary()} | {multipart, [body_part()]} | binary() | map(). +-type body() :: {partial, binary()} | {multipart, [body_part()]} | binary() | zj:value(). -type body_part() :: {Field :: binary(), Data :: binary()} | {Field :: binary(), Name :: binary(), Data :: binary()}.