public async Task HttpBin_Get() { HttpJsonClient client = new HttpJsonClient("http://httpbin.org/get"); var result = await client.Get(); Assert.Equal(null, result.Exception); }
public async Task HttpBin_Put() { HttpJsonClient client = new HttpJsonClient("http://httpbin.org/post"); Employee emp = DataHelper.Defalut.Employees[0]; client.SetBody(emp); var result = await client.Post(); JToken rdata = result.GetResult <JToken>()["data"]; Assert.Equal(emp.EmployeeID, rdata.ToObject <Employee>().EmployeeID); }
public async Task HttpBin_Post() { HttpJsonClient client = new HttpJsonClient("http://httpbin.org/post"); var date = DateTime.Now; client.SetBody(date); var result = await client.Post(); JToken rdata = result.GetResult <JToken>()["data"]; Assert.Equal(date, rdata.ToObject <DateTime>()); }
public AthletesClient(string access_token) { AccessToken = access_token; HttpJsonClient = new HttpJsonClient(AccessToken); }
public AuthenticationClient() { HttpJsonClient = new HttpJsonClient(); }
public StreamsClient(string access_token) { AccessToken = access_token; HttpJsonClient = new HttpJsonClient(AccessToken); }
public ActivitiesClient(string access_token) { AccessToken = access_token; HttpJsonClient = new HttpJsonClient(AccessToken); }