Exemple #1
0
        /// <summary>
        /// This is the object that provides implementation of the IRestable interface and configures it.
        /// </summary>
        public RestClient()
        {
            RefitSettings settings = new RefitSettings()
            {
                ContentSerializer = new JsonContentSerializer()
            };

            _client = RestService.For <IRestable>("https://36vhnw37q6.execute-api.us-east-2.amazonaws.com/Prod", settings);
            source.CancelAfter((int)App.timeoutTime);
        }
        public RestClient()
        {
            RefitSettings settings = new RefitSettings()
            {
                ContentSerializer = new JsonContentSerializer()
            };

            _client = RestService.For <IRestable>("https://36vhnw37q6.execute-api.us-east-2.amazonaws.com/Prod", settings);
            CancellationTokenSource source = new CancellationTokenSource();

            source.CancelAfter(15000);
            token = source.Token;
        }