package mantra.net.http

HttpRequest

CLASS public class

Incoming HTTP/1.1 request entity encapsulating method, path, headers, query parameters, and JSON payload.

🏗️ Constructor Summary

Constructor Signature
def __init__(self, method: String, path: String)

⚙️ Method Summary

Modifier & Return Type Method Signature Description
String get_header(name: String) Returns header value or empty string.
String get_body() Returns raw request body.

🔍 Detailed Method Specifications

pub def get_header(name: String) -> String
Returns header value or empty string.
pub def get_body() -> String
Returns raw request body.

💡 Example Usage

httprequest_example.mantra
print("Method: " + req.method)
print("Auth: " + req.get_header("Authorization"))