Software /
code /
prosody
File
teal-src/net/http/parser.d.tl @ 12662:07424992d7fc
mod_authz_internal, and more: New iteration of role API
These changes to the API (hopefully the last) introduce a cleaner separation
between the user's primary (default) role, and their secondary (optional)
roles.
To keep the code sane and reduce complexity, a data migration is needed for
people using stored roles in 0.12. This can be performed with
prosodyctl mod_authz_internal migrate <host>
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 17 Aug 2022 16:38:53 +0100 |
parent | 12609:a8eb838fc6cf |
line wrap: on
line source
local record httpstream feed : function(httpstream, string) end local type sink_cb = function () local record httppacket enum http_method "HEAD" "GET" "POST" "PUT" "DELETE" "OPTIONS" -- etc end method : http_method record url_details path : string query : string end url : url_details path : string enum http_version "1.0" "1.1" end httpversion : http_version headers : { string : string } body : string | boolean body_sink : sink_cb chunked : boolean partial : boolean end local enum error_conditions "cancelled" "connection-closed" "certificate-chain-invalid" "certificate-verify-failed" "connection failed" "invalid-url" "unable to resolve service" end local type success_cb = function (httppacket) local type error_cb = function (error_conditions) local enum stream_mode "client" "server" end local record lib new : function (success_cb, error_cb, stream_mode) : httpstream end return lib