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

com.iwbfly.myhttp.annotation.Patch Maven / Gradle / Ivy

The newest version!
package com.iwbfly.myhttp.annotation;

import com.iwbfly.myhttp.logging.Logger;

import java.lang.annotation.*;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Patch {

    /**
     * target http url
     * @return url
     */
    String url();

    /**
     * type of response data: 
* text json xml
* default value is "auto" * @return dataType */ String dataType() default "auto"; /** * whether can use async http request or not * @return async */ boolean async() default false; int timeout() default -1; /** * Class of retryer * @return retryer */ Class retryer() default void.class; /** * max count to retry * @return retryCount */ int retryCount() default 0; int maxRetryInterval() default -1; /** * Content Type * @return contentType */ String contentType() default ""; /** * Content Encoding * @return contentEncoding */ String contentEncoding() default ""; /** * User Agent * @return userAgent */ String userAgent() default ""; /** * Charset, Default is UTF-8 * @return charset */ String charset() default ""; /** * request headers:
* use the key-value format: key: value
*
     *         headers = "Content-Type: application/json"
     *     
* multiple headers
*
     *         headers = {
     *            "Content-Type: application/json",
     *            "Accept: text/plain"
     *         }
     *     
* variables and parameters
*
     *         headers = {"Accept: ${value}"}
     *     
* @return headers */ String[] headers() default {}; Class[] interceptor() default {}; String[] data() default {}; long progressStep() default -1L; Class decoder() default Object.class; /** * KeyStore Id * @return keyStore */ String keyStore() default ""; Logger.Level loggerLevel() default Logger.Level.FULL; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy