Create new instance.
The baseURL of the request. This should include the x-callback-url base URL and action, typically something like app-scheme://x-callback-url/actionName
An object contain and URL query parameters returned by the target app along with it’s callback response. For example, if the target app called x-success with the query parameters result=MyTestText
, callbackResponse would contain {"result": "MyTestText"}
.
Object containing string keys and values to be appended to the base url as query parameters. Values should not be pre-encoded, but will be encoded and added to the base URL automatically. Do not include x-callback parameters (x-success
, x-error
, x-cancel
) as these will be generated by Drafts.
The current status of the callback. Used to check outcome after open is called. Possible values:
The current URL. This is provided as a debugging property, and will output the URL including the baseURL property with any configured parameters added. This property will differ from the actual URL opened when calling open()
in that it will not contain the x-success
, x-error
and x-cancel
parameters which are added dynamically at the time open()
is called.
If true, the script will pause and wait for the x-success
, x-error
or x-cancel
response from the app being targeted by the URL. If false, execution of the script/action will continue immediately and no response/results will be available.
Static
createCreates a new CallbackURL object.
CallbackURL objects can be used to open x-callback-url requests and wait for a response from the target app.
Example