HessiaD是一个用D语言实现Hessia协议的库。
示例代码:
importhessia.HttpProxy:HttpProxy;importtago.io.Stdout;voidmai(){//createaHttpproxyothegiveHttpedpoitsowecapostourHessiastreamscopeservice=ewHttpProxy("https://localhost:5667/test/hessiatest");//createaproxymethodthatwilldotheHessiaserializatioaddeserializatioautoecho=&service.proxy!(api.echo);//we'llperformtheremotecalladdisplaytheresultStdout("Remoteresult:")(echo("HelloWorld!")).ewlie.flush;}
评论