Microsoft.Office.Server.Search.REST.SearchServiceException

Brass Contributor

Dear Ladies and Gentlemen,

 

I receive this Exception:

Microsoft.Office.Server.Search.REST.SearchServiceException

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

    });

 

context.spHttpClient

        .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.