/// <summary> /// Sends request to server via HTTP and deserialize string response /// </summary> /// <param name="request">MethodCall object</param> /// <returns>MethodResponse object</returns> public async Task <MethodResponse> SendRequestAndDeserialize(MethodCall request) { if (m_Uri != null) { string xmlRpcString = XmlRpcSerialization.XmlRpcSerialize(request); string responseString = await this.postHttp(xmlRpcString); MethodResponse response = XmlRpcSerialization.XmlRpcDeserialize(responseString); return(response); } else { throw new InvalidOperationException(); } }
/// <summary> /// Deserializes Response from string /// </summary> /// <param name="responseString">response string</param> /// <returns>MethodResponse object</returns> public MethodResponse DeserializeResponse(string responseString) { return(XmlRpcSerialization.XmlRpcDeserialize(responseString)); }