Ejemplo n.º 1
0
        private async Task <Api3Order> RequestAndFetchXmlResponse(string apiUrl, Api3Order api3Order)
        {
            var request = new RestRequest
            {
                RequestFormat = DataFormat.Xml,
                XmlSerializer = new DotNetXmlSerializer()
            };

            request.AddXmlBody(api3Order);

            var client = SetUpClient(apiUrl);

            var response = await client.PostAsync <Api3Order>(request);

            return(response);
        }
Ejemplo n.º 2
0
        public async void Post([FromBody] Api3Order order)
        {
            string url = $"{BaseUrl}/api/orders/postapi3";

            await ReturnValueToMainController(url, QUOTE);
        }