Example #1
0
 public List <FlightModel> Ask(string flightNo)
 {
     return(HttpRequestBuilder.CreateNew()
            .WithUrl($"http://localhost:21000/api/flights?flightNo={flightNo}")
            .WithGetVerb()
            .DispatchAsync <List <FlightModel> >()
            .Result);
 }
 public void Perform(FlightCalculationRequestModel model)
 {
     HttpRequestBuilder.CreateNew()
     .WithUrl("http://localhost:21000/api/flights")
     .WithPostVerb()
     .WithContentAsJson(model)
     .DispatchAsync()
     .Wait();
 }