I'm not sure if this is where i should be asking but i'm trying to write a HTTP Client class which is meant to roughly do the following but i don't even know where to begin. any help will be greatly appreciated
• Get web server host and port from request
• Get the resource path on web server from the request
• Get request parameter name/value pairs
• Construct post request body
• Get the length of the post request body
• Open a connection to the web server (avaya/~STUDENTID)
• Get socket input stream and wrap it in a buffered reader so it can be read line-by-line
• Get socket output stream and wrap it in a buffered writer so it can be written to line-by-line
• write the http post request to the web server connection
• create an object to encapsulate the http response data
• Read the http response status line
• Extract the response status code and its description from the http response status line
• Store the response status and description
• If the response status code does not indicate success then raise an exception
• Read the http response headers - terminated by a blank line
• Split response header into a header name and value
• Read the http response body
• Close the connection to the web server
• Return the response