Handle auth tokens with insufficient permissions

This commit is contained in:
Brahim Hadriche committed 2023-09-10 17:03:29 -04:00
1 parent d6cc192775
commit fe30fb6cef
6 files changed
+40 -15

No files matched your search

@@ -205,6 +205,11 @@ namespace HttpClient
end if
m.urlTransfer = m.CreateRoUrlTransfer()
if m.urlTransfer = invalid
m.log.error("Failed to create roUrlTransfer. We're probably not in a background thread.")
return m
end if
m.urlTransfer.setUrl(m.BuildUrl())
if m._headers <> invalid
m.urlTransfer.SetHeaders(m._headers)
@@ -321,6 +326,9 @@ namespace HttpClient
private function CreateRoUrlTransfer() as object
urlTransfer = CreateObject("roUrlTransfer")
if urlTransfer = invalid
return invalid
end if
urlTransfer.EnableEncodings(true)
urlTransfer.RetainBodyOnError(true)
if LCase(left(m._url, 6)).StartsWith("https:")