Closed Norbiros closed 2 years ago
how to use it
For example like this:
if header "Accept-Language" of the request starts with "en-US":
In some files, you can find tags like @Examples
@Name("Request Header")
@Description({"When connection is made, client send data about it. ",
"You can access to them using this code!)"})
@Since("1.2.1")
@Examples({"return header \"User-Agent\" of the request",
"if header \"Accept-Language\" of the request starts with \"en-US\":"})
Use SimplePropertyExpression
instead of SimpleExpression
.
If you still want to keep the actual code, don't forget to null-check the expression & the parsed value.
Sorry, but I don't understand. This code is practically copy of request's param, if there we don't use it, we I need to use it here? But yes, I can use it...
Now you can get header and read it due to #23. It is nessesary if you want get for example browser that connect to your webpage, or language of request.
Tested on minecraft server!