Fixed hardcoded RPC path

This commit is contained in:
Ben Hood 2009-07-15 12:13:16 +01:00
parent 7f07cf5b71
commit ea8cb93904
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@ function log() {
function testMain() {
log("Starting.");
var testService = new JsonRpcService(document.location + "rpc/test", onReady);
var testService = new JsonRpcService("/rpc/test", onReady);
function onReady() {
testService.test_proc("Hello, world!").addCallback(log);
}

View File

@ -30,8 +30,7 @@ loop(Req, DocRoot) ->
Req:serve_file(Path, DocRoot)
end;
'POST' ->
%% TODO The path is hard coded to handle mod_http_test
case rfc4627_jsonrpc_mochiweb:handle("/mod_http_test/rpc", Req) of
case rfc4627_jsonrpc_mochiweb:handle("/rpc", Req) of
no_match ->
io:format("PROCESSING REQUEST ~p~n",[Req]),
Req:not_found();
@ -41,7 +40,7 @@ loop(Req, DocRoot) ->
_ ->
Req:respond({501, [], []})
end.
%% ----------------------------------------------------------------------
%% NON-HTTP API - maybe this should go in some other module
%% ----------------------------------------------------------------------