Package com.petarmc.lib.net
Class HttpResponse
java.lang.Object
com.petarmc.lib.net.HttpResponse
Represents an HTTP response with status code, body, and headers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
statusCode
public final int statusCodeThe HTTP status code of the response. -
body
The body of the response as a string. -
headers
-
-
Constructor Details
-
HttpResponse
-
-
Method Details
-
isSuccess
public boolean isSuccess()Returns true if the status code indicates a successful response (200-299).- Returns:
- true if status code is 200–299, false otherwise
-
toString
-