File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,12 @@ export class FilesSearchService {
144
144
}
145
145
146
146
// Submit the request
147
- const apiUrl : string = `https://www.bingapis.com/api/v7/images/search?appid=${ this . bingAPIKey } &traffictype=Internal_monitor&q=${ encodeURIComponent ( query ) } &count=${ maxResults } &aspect=${ aspect } &maxFileSize=${ maxFileSize } &mkt=en-US&size=${ size } &license=${ license } ` ;
148
-
147
+ const apiUrl : string = `https://api.cognitive.microsoft.com/bing/v7.0/images/search?traffictype=Internal_monitor&q=${ encodeURIComponent ( query ) } &count=${ maxResults } &aspect=${ aspect } &maxFileSize=${ maxFileSize } &mkt=en-US&size=${ size } &license=${ license } ` ;
148
+ const headers = new Headers ( {
149
+ 'Ocp-Apim-Subscription-Key' : this . bingAPIKey
150
+ } ) ;
149
151
const searchDataResponse : any = await this . context . httpClient . get ( apiUrl , SPHttpClient . configurations . v1 , {
150
- headers : new Headers ( ) ,
152
+ headers : headers ,
151
153
method : 'GET' ,
152
154
mode : 'cors'
153
155
} ) ;
You can’t perform that action at this time.
0 commit comments