Exemplo n.º 1
0
        public ResponseBase PostApplication(PostApplicationRequest request)
        {
            using (var client = GetClientByHeaderAuthorization(request.Token))
            {
                var response = client.PostAsync(UrlTemplates.PostApplicationUrl, new StringContent(
                                                    JsonSerializer.Serialize(request),
                                                    Encoding.UTF8, "application/json")).Result;

                var content = JsonSerializer.Deserialize <ResponseBase>(response.Content.ReadAsStringAsync().Result, optionsSerialize);
                content.StatusCode = response.StatusCode;

                return(content);
            }
        }
Exemplo n.º 2
0
 /// <inheritdoc />
 public ResponseBase PostApplication(PostApplicationRequest request)
 {
     return(_applicationHttpService.PostApplication(request));
 }