Json question about body data form

Hi everyone !
My name is Mauricio, i’m from Brazil.
I have a question about Json, i’m trying to pass --form to UrlConnection
Here is a line that i would like to send in Json by UrlConnection:
–form ‘file=@"/C:/Users/flavio.carvalho/Downloads/fwdcanbsxmls (1)/ArquivoXml02-01-2021 11-04-17/32201230161016000147550010000372981182115920-nfe-proc.xml"’
i need to pass in ( --form ) a file www-url-encoded.
This example is in curl and it works.
Would somebody help me ?
Thanks
Mauricio.

--file is multipart/form-data encoded, not www-url-encoded. Try the method demonstrated in this old thread: