Package edu.pdx.cs410J.web
Class HttpRequestHelper
java.lang.Object
edu.pdx.cs410J.web.HttpRequestHelper
A helper class that provides methods for requesting resources via HTTP
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Encapsulates a response to an HTTP requeststatic class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPerforms an HTTP DELETEPerforms an HTTP GETstatic void
A main method that requests a resource from a URL using a given HTTP methodPerforms an HTTP POSTPerforms an HTTP PUT on the given URL
-
Constructor Details
-
HttpRequestHelper
-
-
Method Details
-
get
Performs an HTTP GET- Parameters:
parameters
- The key/value query parameters- Returns:
- A
Response
summarizing the result of the GET - Throws:
IOException
-
post
Performs an HTTP POST- Parameters:
parameters
- The key/value parameters- Returns:
- A
Response
summarizing the result of the POST - Throws:
IOException
-
delete
Performs an HTTP DELETE- Parameters:
parameters
- The key/value parameters- Returns:
- A
Response
summarizing the result of the POST - Throws:
IOException
-
put
Performs an HTTP PUT on the given URL- Parameters:
parameters
- key/value parameters to the put- Returns:
- A
Response
summarizing the result of the PUT - Throws:
IOException
-
main
A main method that requests a resource from a URL using a given HTTP method- Throws:
IOException
-