V
Size: a a a
V
V
{escript_incl_apps, [myapp]}.
{escript_main_app, myapp}.
{escript_name, myapp}.
{escript_emu_args, "%%! -escript main myapp_script -config ./config/sys.config\n"}.
AB
DP
วโ
ИИ
ИИ
วโ
วโ
VS
ML
-record(input, {
key1 = undefined :: integer(),
key2 = undefined :: binary()
}).
-record(output, {
r1 = undefined :: integer(),
r2 = undefined :: integer()
}).
-spec api_fun(#{key1 => {qs_int,key1}, key2 => {header,<<"x-key2">>}} :: #input{}) -> #output{}.
api_fun(#input{key1 = K1, key2 = K2}) ->
#output{r1 = K1, r2 = case K2 of undefined -> undefined; _ -> binary_to_integer(K2) end}.
VS
-record(input, {
key1 = undefined :: integer(),
key2 = undefined :: binary()
}).
-record(output, {
r1 = undefined :: integer(),
r2 = undefined :: integer()
}).
-spec api_fun(#{key1 => {qs_int,key1}, key2 => {header,<<"x-key2">>}} :: #input{}) -> #output{}.
api_fun(#input{key1 = K1, key2 = K2}) ->
#output{r1 = K1, r2 = case K2 of undefined -> undefined; _ -> binary_to_integer(K2) end}.
-type rest_args(QsDesc, Input) :: Input.
-spec api_fun(rest_args([{key1, {header, ...}}, ...], #input{})) -> #output{}.
ML
-type rest_args(QsDesc, Input) :: Input.
-spec api_fun(rest_args([{key1, {header, ...}}, ...], #input{})) -> #output{}.
-http_request #{key1 => {qs_int,key1}, key2 => {header,<<"x-key2">>}}.
-spec api_fun(#input{}) -> #output{}.