public async Task<bool> ServiceRegisterAsync(Service service) { var uri = GetRequestUri("agent/service/register"); var request = new HttpRequestMessage(HttpMethod.Put, uri); request.Content = new StringContent(JsonConvert.SerializeObject(service), Encoding.UTF8, "application/json"); var response = await Execute(request); return response.StatusCode == HttpStatusCode.OK; }
public bool ServiceRegister(Service service) { return ServiceRegisterAsync(service).ExecuteSync(); }