Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (21 sloc) 0.825 kB
<erl module=haxe_sample>
-export([respond/2]).
out(A) ->
A1 = A#arg{state = {new_state, "alive and kicking"}},
yaws_rpc:handler(A1, {haxe_sample, respond}).
respond(State, {call, failure, Value} = _Request) ->
{ false, { error, { struct, [ { message, "Failure" }, { code, 500 } ] } } };
respond(State, {call, echo, Value} = _Request) ->
{new_state, StateVal} = State,
{array, [First, Second]} = Value,
Response =
{response,
{struct, [
{you_sent_first, First},
{btw, "Hello haXe!"},
{also, {array, ["take", "this", 4, "array"]}},
{my_state_is, StateVal}
]
}},
{true, 0, null, Response}.
</erl>
Jump to Line
Something went wrong with that request. Please try again.