Esempio n. 1
0
        protected string GetApiResponse(string endpoint, ApiMethod method)
        {
            var client   = new SentralRestClient(GetUri(endpoint), _header, method, null);
            var response = client.Invoke();

            return(response);
        }
Esempio n. 2
0
        protected T GetApiResponse <T>(string endpoint, ApiMethod method, string payload)
        {
            var client   = new SentralRestClient(GetUri(endpoint), _header, method, payload);
            var response = client.Invoke();

            return(JsonConvert.DeserializeObject <T>(response, _settings));
        }
Esempio n. 3
0
        protected BinaryFile GetBinaryFile(string endpoint)
        {
            var client = new SentralRestClient(GetUri(endpoint), _header, ApiMethod.GET, null);

            return(client.InvokeBinaryResponse());
        }
Esempio n. 4
0
        protected byte[] GetBinaryData(string endpoint)
        {
            var client = new SentralRestClient(GetUri(endpoint), _header, ApiMethod.GET, null);

            return(client.InvokeBinary());
        }