HttpPost() public method

public HttpPost ( string xmlRequest, string>.Dictionary config ) : string
xmlRequest string
config string>.Dictionary
return string
Ejemplo n.º 1
0
        private litleOnlineResponse sendToLitle(litleOnlineRequest request)
        {
            string xmlRequest  = request.Serialize();
            string xmlResponse = communication.HttpPost(xmlRequest, config);

            try
            {
                litleOnlineResponse litleOnlineResponse = DeserializeObject(xmlResponse);
                if ("1".Equals(litleOnlineResponse.response))
                {
                    throw new LitleOnlineException(litleOnlineResponse.message);
                }
                return(litleOnlineResponse);
            }
            catch (InvalidOperationException ioe)
            {
                throw new LitleOnlineException("Error validating xml data against the schema", ioe);
            }
        }