response_version

Attribute Macro response_version 

Source
#[response_version]
Expand description

Sets the HTTP response version.

This attribute macro configures the HTTP response version that will be sent with the response. The version can be provided as a variable or code block.

ยงUsage

use hyperlane::*;
use hyperlane_macros::*;

#[response_version(HttpVersion::HTTP1_1)]
async fn version_from_constant(ctx: Context) {
    // Response will have version from global constant
}

The macro accepts a variable or code block for the response version and should be applied to async functions that accept a Context parameter.