Function psibase::serve_pack_action
source · pub fn serve_pack_action<Wrapper: WithActionStruct>(
request: &HttpRequest
) -> Option<HttpReply>
Expand description
Handle /pack_action/
request
If request
is a POST /pack_action/x
, where x
is an action
on Wrapper
, then this parses a JSON object containing the arguments
to x
, packs them using fracpack, and returns the result as an
application/octet-stream
.
If request
doesn’t match the above, or the action name is not found,
then this returns None
.
Wrapper
should be generated by #[psibase::service]
.