Utility HTTP : HTTP Request Pass X-HTTP-Method
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-02-21 10:53 AM
I'm trying to connect to a REST API using HTTP Request. Ideally, GET and POST methods are working to read/write into a Sharepoint list via REST api. But there is one function that requires to edit an existing item that uses:
X-HTTP-Method: MERGE
If I use POST, it creates a new item but the requirement is to update. Under which parameter of HTTP Request can I pass X-HTTP-Method?
X-HTTP-Method: MERGE
If I use POST, it creates a new item but the requirement is to update. Under which parameter of HTTP Request can I pass X-HTTP-Method?
Authorization: "Bearer " + accessToken
Accept: "application/json;odata=verbose"
Content-Type: "application/json"
X-HTTP-Method: "MERGE"
{
"__metadata": {
"type": "SP.Data.TestListItem"
},
"Status": "In Progress"
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-02-21 02:31 PM
Hi @NehaBijalwan,
X-HTTP-Method is a custom HTTP header. My understanding is that you would add that header to the Headers Collection and set its value to Merge. However, the HTTP method you would select on the VBO would actually be a POST. The custom header will notify the server that it needs to handle the Post as a Merge.
Cheers,
X-HTTP-Method is a custom HTTP header. My understanding is that you would add that header to the Headers Collection and set its value to Merge. However, the HTTP method you would select on the VBO would actually be a POST. The custom header will notify the server that it needs to handle the Post as a Merge.
Cheers,
