Thanks boby.
Actually I tried both solutions but I still get the error. I can't use just function module HTTP_POST because it's an https ssl call, so I created a Http destinaton linked to the certificate, etc., to use with method cl_http_client-> create_by_destination.
If I use method add_multipart, the web site doesn't recognize the parameters there. So the only method that doen't give an error is the method set_form_field, but my problem is how to send a value to a parameter type file.
Thanks,