aboutsummaryrefslogblamecommitdiffstats
path: root/test/handlers/send_message_h.erl
blob: 02d21392d657e03a315a5ae117a52af3ccf4fb22 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                    
%% This module sends a message to the pid passed in a header.

-module(send_message_h).
-export([init/2]).

init(Req, State) ->
	Pid = list_to_pid(binary_to_list(cowboy_req:header(<<"x-test-pid">>, Req))),
	Pid ! {Pid, self(), init, Req, State},
	{ok, cowboy_req:reply(200, Req), State}.