Annotation Type FormParam


@Retention(RUNTIME) @Target(PARAMETER) public @interface FormParam
Annotation for form parameters to be sent to a REST API Request URI.

Example:

 @Post("spellcheck")
 Mono<Response<ResponseBody>> spellChecker(@HeaderParam("X-BingApis-SDK") String xBingApisSDK,
     @QueryParam("UserId") String userId,
     @FormParam("Text") String text);
 

The value of parameter text will be encoded and encoded value will be added to the form data sent to the API.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the form parameter is already form encoded.
  • Element Details

    • value

      String value
      Returns:
      The name of the key in a key value pair as part of the form data.
    • encoded

      boolean encoded
      Whether the form parameter is already form encoded.

      A value true for this argument indicates that value of value() is already encoded hence engine should not encode it, by default value will be encoded.

      Returns:
      Whether this query parameter is already encoded.
      Default:
      false