Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private async createListItem() {
try {
const spOpts: ISPHttpClientOptions = {
body: `{ Title: 'My New Item' }`
const response = await`'test')/items`, SPHttpClient.configurations.v1, spOpts);
if (!response.ok) {
const responseText = await response.text();
throw new Error(responseText);
const responseJSON = await response.json();
} catch (error) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment