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

            return(response);
        }
예제 #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));
        }
예제 #3
0
        protected BinaryFile GetBinaryFile(string endpoint)
        {
            var client = new SentralRestClient(GetUri(endpoint), _header, ApiMethod.GET, null);

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

            return(client.InvokeBinary());
        }