Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Runtimes
Web triggers
Async events
Atlassian app REST APIs
Fetch APIs
Last updated Dec 6, 2021

Basic fetch client

The basic fetch client provides a simple HTTP client. Import the Forge API package in your app, as follows:

1
2
import { fetch } from '@forge/api';

To check the status of a request, use status as shown below:

1
2
const result = await fetch(
  "https://example.net/"
);
const status = result.status;

See the Using the Fetch API with Undici in Node.js section of the undici documentation for full implementation details.

Method signature

1
2
fetch(url[, options]) => Promise<Response>

Parameters

Rate this page: