internal override async Task <RelationsResponse> RelationsRequestAsync(string pfx, string rfc, string password, string uuid) { RelationsResponseHandler handler = new RelationsResponseHandler(); try { new Validation(Url, User, Password, Token).ValidateHeaderParameters(); var headers = await GetHeadersAsync(); var content = this.RequestRelations(pfx, rfc, password, uuid); var proxy = Helpers.RequestHelper.ProxySettings(this.Proxy, this.ProxyPort); return(await handler.GetPostResponseAsync(this.Url, "relations/pfx", headers, content, proxy)); } catch (Exception e) { return(handler.HandleException(e)); } }
internal override async Task <RelationsResponse> RelationsRequestAsync(string rfc, string uuid) { RelationsResponseHandler handler = new RelationsResponseHandler(); try { new Validation(Url, User, Password, Token).ValidateHeaderParameters(); HttpWebRequest request = await this.RequestRelationsAsync(rfc, uuid); request.ContentType = "application/json"; request.ContentLength = 0; request.Method = WebRequestMethods.Http.Post; var headers = await GetHeadersAsync(); var proxy = Helpers.RequestHelper.ProxySettings(this.Proxy, this.ProxyPort); return(await handler.GetPostResponseAsync(this.Url, headers, $"relations/{rfc}/{uuid}", proxy)); } catch (Exception e) { return(handler.HandleException(e)); } }