/
aadhttpclient.yml
135 lines (133 loc) · 6.23 KB
/
aadhttpclient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
### YamlMime:TSType
name: AadHttpClient
uid: '@microsoft/sp-http-base!AadHttpClient:class'
package: '@microsoft/sp-http-base!'
fullName: AadHttpClient
summary: AadHttpClient is used to perform REST calls against an Azure AD Application.
remarks: >-
This class is marked as `@sealed`. Subclasses should not extend it.
For communicating with SharePoint, use the [SPHttpClient](xref:@microsoft/sp-http-base!SPHttpClient:class) class
instead. For communicating with Microsoft Graph, use the
[MSGraphClient](xref:@microsoft/sp-http-msgraph!MSGraphClient:class) class.
isPreview: false
isDeprecated: false
type: class
constructors:
- name: '(constructor)(serviceScope, resourceEndpoint, options)'
uid: '@microsoft/sp-http-base!AadHttpClient:constructor(1)'
package: '@microsoft/sp-http-base!'
fullName: '(constructor)(serviceScope, resourceEndpoint, options)'
summary: Constructs a new instance of the `AadHttpClient` class
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'constructor(serviceScope: ServiceScope, resourceEndpoint: string, options?: IAadHttpClientOptions);'
parameters:
- id: serviceScope
description: The service scope is needed to retrieve some of the class's internal components.
type: '<xref uid="@microsoft/sp-core-library!ServiceScope:class" />'
- id: resourceEndpoint
description: The resource for which the token should be obtained.
type: string
- id: options
description: Configuration options for the request to get an access token.
type: '<xref uid="@microsoft/sp-http-base!IAadHttpClientOptions:interface" />'
properties:
- name: configurations
uid: '@microsoft/sp-http-base!AadHttpClient.configurations:member'
package: '@microsoft/sp-http-base!'
fullName: configurations
summary: The standard predefined AadHttpClientConfiguration objects for use with the AadHttpClient class.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static readonly configurations: IAadHttpClientConfigurations;'
return:
type: '<xref uid="@microsoft/sp-http-base!IAadHttpClientConfigurations:interface" />'
methods:
- name: 'fetch(url, configuration, options)'
uid: '@microsoft/sp-http-base!AadHttpClient#fetch:member(1)'
package: '@microsoft/sp-http-base!'
fullName: 'fetch(url, configuration, options)'
summary: Performs a REST service call.
remarks: >-
Although the AadHttpClient subclass adds additional enhancements, the parameters and semantics for
HttpClient.fetch() are essentially the same as the WHATWG API standard that is documented here:
https://fetch.spec.whatwg.org/
isPreview: false
isDeprecated: false
syntax:
content: >-
fetch(url: string, configuration: AadHttpClientConfiguration, options: IHttpClientOptions):
Promise<HttpClientResponse>;
parameters:
- id: url
description: The endpoint URL that fetch will be called on.
type: string
- id: configuration
description: >-
Determines the default behavior of HttpClient; normally this should be the latest version number from
HttpClientConfigurations.
type: '<xref uid="@microsoft/sp-http-base!AadHttpClientConfiguration:class" />'
- id: options
description: Additional options that affect the request.
type: '<xref uid="@microsoft/sp-http-base!IHttpClientOptions:interface" />'
return:
type: 'Promise<<xref uid="@microsoft/sp-http-base!HttpClientResponse:class" />>'
description: A promise that will return the result.
- name: 'get(url, configuration, options)'
uid: '@microsoft/sp-http-base!AadHttpClient#get:member(1)'
package: '@microsoft/sp-http-base!'
fullName: 'get(url, configuration, options)'
summary: 'Calls fetch(), but sets the method to "GET".'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
get(url: string, configuration: AadHttpClientConfiguration, options?: IHttpClientOptions):
Promise<HttpClientResponse>;
parameters:
- id: url
description: The endpoint URL that fetch will be called on.
type: string
- id: configuration
description: >-
Determines the default behavior of HttpClient; normally this should be the latest version number from
HttpClientConfigurations.
type: '<xref uid="@microsoft/sp-http-base!AadHttpClientConfiguration:class" />'
- id: options
description: Additional options that affect the request.
type: '<xref uid="@microsoft/sp-http-base!IHttpClientOptions:interface" />'
return:
type: 'Promise<<xref uid="@microsoft/sp-http-base!HttpClientResponse:class" />>'
description: A promise that will return the result.
- name: 'post(url, configuration, options)'
uid: '@microsoft/sp-http-base!AadHttpClient#post:member(1)'
package: '@microsoft/sp-http-base!'
fullName: 'post(url, configuration, options)'
summary: 'Calls fetch(), but sets the method to "POST".'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
post(url: string, configuration: AadHttpClientConfiguration, options: IHttpClientOptions):
Promise<HttpClientResponse>;
parameters:
- id: url
description: The endpoint URL that fetch will be called on.
type: string
- id: configuration
description: >-
Determines the default behavior of HttpClient; normally this should be the latest version number from
HttpClientConfigurations.
type: '<xref uid="@microsoft/sp-http-base!AadHttpClientConfiguration:class" />'
- id: options
description: Additional options that affect the request.
type: '<xref uid="@microsoft/sp-http-base!IHttpClientOptions:interface" />'
return:
type: 'Promise<<xref uid="@microsoft/sp-http-base!HttpClientResponse:class" />>'
description: A promise that will return the result.