Brass Contributor

Dear Ladies and Gentlemen,


I receive this Exception:


when I try to execute following code in SharePoint Framework in SharePoint on premise:


let restApiUrl: string = context.pageContext.web.absoluteUrl + "/_api/search/query?querytext='Test'";


let config: SPHttpClientConfiguration = new SPHttpClientConfiguration({

        defaultODataVersion: ODataVersion.v3




        .get(restApiUrl, config, { headers: { Accept: "application/json;odata=minimalmetadata;charset=utf-8"}})

        .then((response: SPHttpClientResponse) => {


Thank you for your help.


With best regards

Ladislav Stupak

1 Reply

Hi @LadislavStupak  i am having the same, did you got the solution?
i getting error in postman.