class Protocol::HTTP::Request

def as_json(...)

@returns [Hash] The request as a hash.

Convert the request to a hash, suitable for serialization.
def as_json(...)
	{
		scheme: @scheme,
		authority: @authority,
		method: @method,
		path: @path,
		version: @version,
		headers: @headers&.as_json,
		body: @body&.as_json,
		protocol: @protocol
	}
end