What is difference between @FormDataParam and @FormParam

前端 未结 2 1777
情书的邮戳
情书的邮戳 2020-12-14 03:12

What is the difference between @FormDataParam and @FormParam?

I was using multiple @FormDataParam in a method but it was throw

2条回答
  •  鱼传尺愫
    2020-12-14 03:18

    From the documentation FormParam:

    Binds the value(s) of a form parameter contained within a request entity body to a resource method parameter. Values are URL decoded unless this is disabled using the Encoded annotation. A default value can be specified using the DefaultValue annotation. If the request entity body is absent or is an unsupported media type, the default value is used.

    and FormDataParam

    Binds the named body part(s) of a "multipart/form-data" request entity body to a resource method parameter.

提交回复
热议问题