Sub Button1_Click
Dim JsonFile As String
JsonFile = File.ReadString(File.DirAssets, "bestellung.json")
Log(JsonFile)
Try
Dim j As HttpJob
j.Initialize("j",Me)
j.Username = key
j.Password = sec
j.Head("application/json")
'j.GetRequest.SetHeader("Authorization", $"Basic $(authInfo)"$)
j.PostString("https://bergmannedelmetalle.com/wp-json/wc/v3/orders/", JsonFile)
j.GetRequest.SetContentType("application/json")
Wait For (j) JobDone (j As HttpJob)
If j.Success Then
Log(j.GetString)
Else
Log("Error: " & j.ErrorMessage)
End If
j.Release
Catch
xui.MsgboxAsync(j.Response , "Geht nicht")
End Try
End Sub