Android Question HTTP PATCH Request

mw71

Active Member
Licensed User
Longtime User
dear Erel,

thanks for fast Anser! The Code i use now:
B4X:
Dim OutUpdate As OutputStream         
Dim InUpate As InputStream = File.OpenInput(LocalDir, LocalFilename)
Dim req As OkHttpRequest
Dim hc As OkHttpClient
       
OutUpdate.InitializeToBytesArray(1000)            'Initialize the stream
File.Copy2(InUpate, OutUpdate)                    'Copy the filestream in the output stream
data = OutUpdate.ToBytesArray                    'Fill export data array
       
       
req.InitializePatch2("https://www.googleapis.com/upload/drive/v3/files" & "/" & FileId & "?uploadType=media", data)
req.SetHeader("Authorization", "Bearer " & myToken)
hc.InitializeAcceptAll("hc")
hc.Execute(req,3)

The Response go to hc_ResposeError/hc_ResponseSuccess.


Has Someone an idea for a solution with "Wait For"
 
Upvote 0
Top