ru.tinkoff.kora.http.common.annotation.Header Maven / Gradle / Ivy
The newest version!
package ru.tinkoff.kora.http.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Русский: Аннотация указывает аргумент метода должен быть интерпретирован как заголовок запроса/ответа
*
* English: Annotation specifies the method argument should be interpreted as a request/response header
*
*
* Пример / Example:
*
* {@code
* @HttpClient("my.config")
* public interface MyHttpClient {
*
* @HttpRoute(method = "GET", path = "/username")
* String getUserCode(@Header("name") String value);
* }
* }
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER})
public @interface Header {
/**
* @return Русский: Описывает имя заголовка параметра
*
* English: Describes the name of the Header parameter
*/
String value() default "";
}