Getting started with SPFx clients
In SPFx components, all utility class instances to consume APIs are exposed through the root this.context property regardless of the type of SPFx solution (web part or extension). These JavaScript object instances are called clients and can be used to make HTTP requests (GET, POST, etc.) to the associated API.
Depending on their use case, developers can use the following SPFx-provided properties and their associated clients:
|
Property |
Client type(s) |
Used to… |
|
|
|
Consume the SharePoint REST API. |
|
|
|
Consume regular HTTP APIs, for instance, internal custom APIs or third-party APIs. |
|
|