Package http.server.requests
Class HttpRequest
java.lang.Object
http.server.requests.HttpRequest
public class HttpRequest
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description java.lang.String[]
accepts
java.util.Map<java.lang.String,java.lang.String>
body
java.lang.String
contentType
HttpMethods
method
java.lang.String
params
-
Method Summary
Modifier and Type Method Description static HttpRequest
readHttpRequest(java.io.BufferedInputStream in)
Parses an Http request sent to the BufferedInputStream attached to the socketjava.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
method
-
params
public java.lang.String params -
contentType
public java.lang.String contentType -
accepts
public java.lang.String[] accepts -
body
public java.util.Map<java.lang.String,java.lang.String> body
-
-
Method Details
-
readHttpRequest
Parses an Http request sent to the BufferedInputStream attached to the socket- Parameters:
in
- BufferedInputStream attached to the socket- Returns:
- HttpRequest created accordingly to the information received
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-