Skip to content

Instantly share code, notes, and snippets.

@AsishP
Created November 12, 2018 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AsishP/44fd2671826b556f467b4bc1d19cc670 to your computer and use it in GitHub Desktop.
Save AsishP/44fd2671826b556f467b4bc1d19cc670 to your computer and use it in GitHub Desktop.
// Do a REST Query to get data from REST using spHttpClient
public componentWillMount()
{
const items: any = await this.props.context.spHttpClient.get(restApi, SPHttpClient.configurations.v1, {
headers: {
'Accept': 'application/json;odata.metadata=none'
}
}).then(resp => resp.json());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment