I designed a class which creates XML for a POST in order to call an API call to a third party API. The class has helper methods; One to form the HttpWebRequest and then one to send it. My question is this:
Should the response (which ultimately I'm going to shove into an XMLReader and parse it to get the values) be returned as an HttpWebResponse, an XMLReader or what? And should that response be returned by the Send HttpWebRequest method I have or simply set to a property in my APIRequest.cs class that is doing the sending? Or should I pass that HttpWebResponse or XMLReader (if i decide to first shove that response into a reader instead) to an entirely different class called APIMethodResponse that holds the values that came back in the Response?
I'm thinking about SOLID and just basic class design here. I'm not sure which way to go with it in terms of handling the response that comes back from the API method call/request that I make with my APIRequest.cs class.
Note: The APIRequest.cs class is really more specfic such as UpdateCustomerRequest.cs since I'm calling the API method UpdateCustomer for example. So the XML I create for the POST is created via a method that creates the necessary nodes and data to send as the POST for the UdpateCustomer method call