Adrian998 Member Licensed User Mar 21, 2018 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2018 #2 Tested it here with a real device and a server using basic authentication. It works fine.
Adrian998 Member Licensed User Mar 21, 2018 #3 I also found the error, the parameters must all be in map, if an authentication. eg: B4X: job.PostMultipart(server & "/setdata.php",CreateMap("auth":authcode,"action":"upload"),files)
I also found the error, the parameters must all be in map, if an authentication. eg: B4X: job.PostMultipart(server & "/setdata.php",CreateMap("auth":authcode,"action":"upload"),files)