HessianD是一个用D语言实现Hessian协议的库。
示例代码:
importhessian.HttpProxy:HttpProxy;importtango.io.Stdout;voidmain(){//createaHttpproxyonthegivenHttpendpointsowecanpostourHessianstreamscopeservice=newHttpProxy("https://localhost:5667/test/hessiantest");//createaproxymethodthatwilldotheHessianserializationanddeserializationautoecho=&service.proxy!(api.echo);//we'llperformtheremotecallanddisplaytheresultStdout("Remoteresult:")(echo("HelloWorld!")).newline.flush;}
评论