public async System.Threading.Tasks.Task RestGetTestAsync() { var node = new RestNode(); node.EndPoint = "http://httpbin.org/get"; node.Method = "get"; await node.Init(new PadExecutionContext() { Pad = new Pad(ExecutionMode.Normal) { Nodes = new List <INode>() } }); await node.Execute(node.Context); Assert.Equal(ExecutionStatus.Success, node.Context.Status); }
public async System.Threading.Tasks.Task RestPostTestAsync() { var node = new RestNode(); node.EndPoint = "http://httpbin.org/post"; node.Method = "post"; node.Body = "Hello World"; await node.Init(new PadExecutionContext() { Pad = new Pad(ExecutionMode.Normal) { Nodes = new List <INode>() } }); await node.Execute(node.Context); Debug.WriteLine(node.Context.Result); Assert.Equal(ExecutionStatus.Success, node.Context.Status); }