File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,9 @@ export class FilesSearchService {
144
144
}
145
145
146
146
// Submit the request
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
- } ) ;
151
- const searchDataResponse : any = await this . context . httpClient . get ( apiUrl , SPHttpClient . configurations . v1 , {
152
- headers : headers ,
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 } &size=${ size } &mkt=en-US&license=${ license } ` ;
148
+
149
+ const searchDataResponse : any = await this . context . httpClient . get ( apiUrl , SPHttpClient . configurations . v1 , {
153
150
method : 'GET' ,
154
151
mode : 'cors'
155
152
} ) ;
You can’t perform that action at this time.
0 commit comments