Package: groovy.http

## [Java] Annotation Type HttpBuilderClient

- groovy.http.HttpBuilderClient

-     @Incubating
      @Retention(RetentionPolicy.SOURCE)
      @Target(ElementType.TYPE)
      public @interface HttpBuilderClient

  Marks an interface as a declarative HTTP client. An implementation class is generated at compile time via AST transform, using HttpBuilder for request execution.

  Example:

       @HttpBuilderClient('https://api.example.com')
       interface MyApi {
           @Get('/users/{id}')
           Map getUser(String id)
       }

       def api = MyApi.create()
       def user = api.getUser('123')

  Since:
    6.0.0

- - ### Element Summary

    Required Element Summary
    Type | Name and Description
    --- | ---
    `String` | `value` The base URL for all requests.

    Optional Element Summary
    Type | Name and Description
    --- | ---
    `int` | `connectTimeout` Connection timeout in seconds.
    `boolean` | `followRedirects` Whether to follow HTTP redirects.
    `int` | `requestTimeout` Request timeout in seconds.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Element Detail

    - #### public int connectTimeout

      Connection timeout in seconds. Default 0 means no timeout.

      Default:
        0

    - #### public boolean followRedirects

      Whether to follow HTTP redirects. Default is false.

      Default:
        false

    - #### public int requestTimeout

      Request timeout in seconds. Default 0 means no timeout.

      Default:
        0

    - #### public String value

      The base URL for all requests.