From 6c45f3091984a8aca41c63553ff6a5e08aa8c870 Mon Sep 17 00:00:00 2001 From: Peter Harpending Date: Sat, 11 Oct 2025 02:07:20 -0600 Subject: [PATCH] have a server that like does stuff now --- include/http.hrl | 4 ++-- priv/index.html | 37 +++++++++++++++++++++++++++++-------- src/fd_client.erl | 37 ++++++++++++++++++++++++++++++++++--- src/fd_client_man.erl | 1 - src/wfc.erl | 6 +++--- src/wfc_eval.erl | 22 +++++++++++++++++++++- src/wfc_eval_context.erl | 20 +++++++++++++++----- src/wfc_read.erl | 4 +++- 8 files changed, 107 insertions(+), 24 deletions(-) diff --git a/include/http.hrl b/include/http.hrl index 27d24d2..014e058 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()}). @@ -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()]} | zj:value() | binary(). -type body_part() :: {Field :: binary(), Data :: binary()} | {Field :: binary(), Name :: binary(), Data :: binary()}. diff --git a/priv/index.html b/priv/index.html index ce3511f..e49fb99 100644 --- a/priv/index.html +++ b/priv/index.html @@ -24,7 +24,7 @@