Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public bool ServiceRegister(Service service)
 {
     return ServiceRegisterAsync(service).ExecuteSync();
 }