All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.zw201913.simplehttp.annotation.Put Maven / Gradle / Ivy

The newest version!
package com.github.zw201913.simplehttp.annotation;

import com.github.zw201913.simplehttp.core.factory.BaseOkHttpClientFactory;
import com.github.zw201913.simplehttp.core.factory.DefaultOkHttpClientFactory;
import com.github.zw201913.simplehttp.core.handler.RequestParamsHandler;
import com.github.zw201913.simplehttp.core.handler.SimpleJsonRequestParamsHandler;
import org.apache.commons.lang3.StringUtils;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/** 注解Put请求方法 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Put {
    /**
     * 请求url
     *
     * @return
     */
    String value() default StringUtils.EMPTY;

    /**
     * 指定创建OkHttpClient的工厂类
     *
     * @return
     */
    Class clientFactory() default
            DefaultOkHttpClientFactory.class;


    /**
     * 使用自定义的RequestParamsHandler,否则就用默认的
     *
     * @return
     */
    Class handler() default SimpleJsonRequestParamsHandler.class;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy