roUrlTransfer objects cannot be created from within render threads. (#740)
This commit is contained in:
parent
da7d43a9aa
commit
d083cec89e
|
@ -1,14 +1,12 @@
|
|||
' Functions for making requests to the API
|
||||
function buildParams(params = {} as object) as string
|
||||
' Take an object of parameters and construct the URL query
|
||||
req = createObject("roUrlTransfer") ' Just so we can use it for escape
|
||||
|
||||
param_array = []
|
||||
for each field in params.items()
|
||||
item = ""
|
||||
if type(field.value) = "String" or type(field.value) = "roString"
|
||||
item = field.key + "=" + req.escape(field.value.trim())
|
||||
'item = field.key + "=" + field.value.trim()
|
||||
item = field.key + "=" + field.value.trim().EncodeUriComponent()
|
||||
else if type(field.value) = "roInteger" or type(field.value) = "roInt"
|
||||
item = field.key + "=" + stri(field.value).trim()
|
||||
'item = field.key + "=" + str(field.value).trim()
|
||||
|
@ -28,8 +26,7 @@ function buildParams(params = {} as object) as string
|
|||
item = field.key + "=null"
|
||||
else if field <> invalid
|
||||
print "Unhandled param type: " + type(field.value)
|
||||
item = field.key + "=" + req.escape(field.value)
|
||||
'item = field.key + "=" + field.value
|
||||
item = field.key + "=" + field.value.EncodeUriComponent()
|
||||
end if
|
||||
|
||||
if item <> "" then param_array.push(item)
|
||||
|
|
Loading…
Reference in New Issue
Block a user