Questions tagged [sphttpclient]
The sphttpclient tag has no usage guidance.
9
questions
0
votes
1
answer
318
views
SPFx: Error in REST API call spHttpClient.get()
In my child component:
I tried to make a rest call from spfx web part to get people results, but it throws errors.
this.props.context.spHttpClient.get(query);
Error: can't read property get of ...
1
vote
2
answers
469
views
SPFx - Update a calculated column formula
I am trying to use this.context.spHttpClient.post() to update a calculated column formula in my SPFx WebPart.
I get a status code of 400 with the error message: "The parameter __metadata does not ...
0
votes
1
answer
1k
views
SPHttpClient undefined error: Using React JS to add item in SharePoint list
I'm trying to add an item in SharePoint Online list using SPFx solution where I'm using React JS to perform the action.
Below is the copied code, when debugging it says that:
"VM242:1 Uncaught ...
0
votes
1
answer
382
views
Problem with SPFx TypeScript json.value.map(k,i) & query via getuserbyid()
Firstly I'll start with extra question:
I'm trying to get data by _api/web/getuserbyid() API call in code.
Do You guys know why there is no option for filtering by query for specific data? I mean by:
...
1
vote
0
answers
1k
views
SPFx TypeScript json response from spHttpClient as array
i want to get data to WebPart from the SharePoint list.
but some of the data are eg. PeoplePicker or Multiple line of text
and I have result shown as:
<div class="...
2
votes
2
answers
3k
views
Update List Item SPfx not working
Below is the code, which is not working, shows below error
An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.
const body: string = ...
0
votes
2
answers
3k
views
'.get' undefined on 'this.context.SPHttpClient'
I am new to SharePoint and I am having trouble making API calls.
child component below:
import * as React from 'react';
import styles from './HelloWorld.module.scss';
import { IHelloWorldProps } ...
2
votes
1
answer
2k
views
Send an email with SPHttpClient
I'm working on a web part for SharePoint 2016 on-prem and I want to send an email from the current user. I cannot use @pnp/sp library as it's not supported with TypeScript 2.2.2 and I'm unable to ...
0
votes
1
answer
3k
views
Uncaught Type Error: Cannot read property 'post' of undefined
The below is my code
import * as React from 'react';
import styles from './PostTest.module.scss';
import { IPostTestProps } from './IPostTestProps';
import { escape } from '@microsoft/sp-lodash-...