/// <summary> /// Actually executes a request /// </summary> /// <param name="RequestData">The Request Data</param> /// <returns>The HTTP Response</returns> private HTTP_Response _DoRequest(string RequestData) { // Opens the connection this._Socket.Connect(); // Sends out the request this._Socket.Send(RequestData); // Fetches the returned data string ResponseData = ""; while (this._Socket.IsConnected || this._Socket.BytesAvailable > 0) { ResponseData += this._Socket.Receive(); } // Closes the connection this._Socket.Close(); // Parses the response data HTTP_Response RetVal = new HTTP_Response(ResponseData); // Parses cookies and such this._ParseHeaders(RetVal.GetAllHeaders()); return(RetVal); }
/// <summary> /// Actually executes a request /// </summary> /// <param name="RequestData">The Request Data</param> /// <returns>The HTTP Response</returns> private HTTP_Response _DoRequest(string RequestData) { // Opens the connection this._Socket.Connect(); // Sends out the request this._Socket.Send(RequestData); // Fetches the returned data string ResponseData = ""; while (this._Socket.IsConnected || this._Socket.BytesAvailable > 0) ResponseData += this._Socket.Receive(); // Closes the connection this._Socket.Close(); // Parses the response data HTTP_Response RetVal = new HTTP_Response(ResponseData); // Parses cookies and such this._ParseHeaders(RetVal.GetAllHeaders()); return RetVal; }