Make requests to your backing extension.
Like requestPlatformData
, requestExtensionData
makes a request through the platform's window. However, it only makes requests to your backing extension, allowing your extension to be the backend to your frontend.
Type
interface RequestOptions {
route: string;
body?: object;
}
tecton.sources.requestExtensionData(requestOptions: RequestOptions): Promise<XMLHttpRequest>
Example
tecton.sources.requestExtensionData({
route: 'create_user',
body: { name: "Tecton", email: "tecton@q2.com" }
}).then((xhr) => {
// Do something with response
})
.catch((xhr) => {
// Fires for non 200 series responses
})
The routing key corresponding to a route in your extension.py
file.
A JSON-serializable object containing your request data.
Extension featureName to call if needing to call extension other than current.
Initial Release