I am writing a generic interface for controller which has below signature
interface IUser{
T createUser(
Map<String, String> headers,
String userName
)
}
This will be implemented by a micronaut project as below
public class UserController implements IUser {
public HttpResponse createUser(
**Map<String, String> headers,** // I am looking to get the header value here as similar to @RequestHeader in spring boot
@PathVariable String userName
){
}
}
I need to know if an Annotation already exists in micronaut to bind the header values or a way to create custom annotation to bind the header values as Map<String, String> as parameter to the controller method.