Questions tagged [sphttpclient]
The sphttpclient tag has no usage guidance.
13
questions
0
votes
0
answers
28
views
I want create item with attachment in SharePoint online with SPHttpClient context?
Below code is attaching file but not all files, means some time 2 file some time 3 file, some time one file but not attaching all file at all in loop.
private btnclick_BtnSubmit = (): void => {
...
0
votes
0
answers
25
views
Can i use AadHttpClient to call SharePoint online enpoint, similar to using SPHttpclient
Can i use AadHttpClient to call SharePoint online endpoints, similar to using SPHttpclient? If the answer is Yes, then when we should use AadHttpClient and when we should use SPHttpClient ?
0
votes
1
answer
354
views
SPHttpClients vs AadHttpClient vs MsGrpahclient
When developing SPFx we are left with many technologies to be used. mainly i am trying to understand when to use each
SPHttpClients vs AadHttpClient vs MsGrpahclient
now i know the SPHttpClient can ...
0
votes
1
answer
41
views
Different technologies to interact with SharePoint and External systems inside our SPFx web part
I am developing 2 SPFx web parts. one which shows items from a SharePoint list and the other shows items assigned for the login user from SLACK.
now for the technologies, to connect to the SharePoint ...
0
votes
1
answer
565
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
647
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
2k
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
558
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
2k
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
4k
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-...