PutterPlace
Active member
- Joined
- Feb 18, 2008
- Messages
- 37
- Programming Experience
- 1-3
I have written a custom HTTP class that utilizes the HTTPWebRequest and HTTPWebResponse classes. The class will either "GET" or "POST" data to a specified URL via the "Send" function declared within my "HTTPClass".
Declaration of "Send" function:
This function has the ability to use a CookieContainer that is passed to the function. However, sometimes after posting information to certain URLs, the CookieCollection that was passed to the function has changed due to new cookies being set/unset. As of right now, this function only returns the html response of the HTTPWebRequest in the form of a string. Is there a way that I could return the response string and also the new CookieCollection, named "CookieJar" in an array of some sort?
Declaration of "Send" function:
VB.NET:
Public Shared Function Send(ByVal URL As String, _
Optional ByVal PostData As String = "", _
Optional ByVal Method As HTTPMethod = HTTPMethod.HTTP_GET, _
Optional ByVal ContentType As String = "", _
Optional ByVal CookieJar As CookieContainer = Nothing)
This function has the ability to use a CookieContainer that is passed to the function. However, sometimes after posting information to certain URLs, the CookieCollection that was passed to the function has changed due to new cookies being set/unset. As of right now, this function only returns the html response of the HTTPWebRequest in the form of a string. Is there a way that I could return the response string and also the new CookieCollection, named "CookieJar" in an array of some sort?