B4X:
Dim job As HttpJob
job.Initialize("Upload",Me)
job.Username = h_user
job.Password = h_pwd
job.PostMultipart(server & "/setdata.php?auth=" & authcode,CreateMap("action":"upload"),files)
Error: ResponseError: unknown error, status code: 401
the same code works on b4a
And job.Download2 works with user & password.