mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Remove http_resp_body/0, inline it directly in the record definition
This commit is contained in:
parent
16d3cb76c7
commit
7b359352d4
1 changed files with 3 additions and 5 deletions
|
@ -13,9 +13,6 @@
|
||||||
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
-type http_resp_body() :: iodata() | {non_neg_integer(),
|
|
||||||
fun(() -> {sent, non_neg_integer()})}.
|
|
||||||
|
|
||||||
-record(http_req, {
|
-record(http_req, {
|
||||||
%% Transport.
|
%% Transport.
|
||||||
socket = undefined :: undefined | inet:socket(),
|
socket = undefined :: undefined | inet:socket(),
|
||||||
|
@ -44,13 +41,14 @@
|
||||||
|
|
||||||
%% Request body.
|
%% Request body.
|
||||||
body_state = waiting :: waiting | done |
|
body_state = waiting :: waiting | done |
|
||||||
{multipart, non_neg_integer(), fun()},
|
{multipart, non_neg_integer(), fun()},
|
||||||
buffer = <<>> :: binary(),
|
buffer = <<>> :: binary(),
|
||||||
|
|
||||||
%% Response.
|
%% Response.
|
||||||
resp_state = waiting :: locked | waiting | chunks | done,
|
resp_state = waiting :: locked | waiting | chunks | done,
|
||||||
resp_headers = [] :: cowboy_http:headers(),
|
resp_headers = [] :: cowboy_http:headers(),
|
||||||
resp_body = <<>> :: http_resp_body(),
|
resp_body = <<>> :: iodata() | {non_neg_integer(),
|
||||||
|
fun(() -> {sent, non_neg_integer()})},
|
||||||
|
|
||||||
%% Functions.
|
%% Functions.
|
||||||
urldecode :: {fun((binary(), T) -> binary()), T}
|
urldecode :: {fun((binary(), T) -> binary()), T}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue