コード例 #1
0
        private string GetAuthorizationHeader(OAuthRequest oAuthRequest)
        {
            var request = new Common.Http.HttpRequest(Settings.SigningUrl)
            {
                Method = HttpMethod.Post,
            };

            request.Headers.Set("Content-Type", "application/json");

            var payload = oAuthRequest.ToJson();

            _logger.Trace(payload);
            request.SetContent(payload);

            var response = _httpClient.Post <AuthorizationHeader>(request).Resource;

            return(response.Authorization);
        }