Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SPFX React Updating Document Library file metadata using Rest API 404 issue

$
0
0

I have the item ID for that particular file, but getting 404 issue. Here is the sample code which have been using:

this.spHttpClient.post(`${url}`,
  SPHttpClient.configurations.v1,
  {
    headers: {"Accept": "application/json; odata=verbose",
      'content-type': 'application/json;odata=verbose',"X-RequestDigest": requestDigest,"X-Http-Method": "MERGE","If-Match": "*"
    },
    body: JSON.stringify({"__metadata": { "type": "SP.Data.10Q_x0020_and_x0020_10K_x0020_Filing_x0020_UnzippedItem" },"Title": titleLinkUrl
    })
  })
  .then((response: SPHttpClientResponse): void => {
    alert('sucess')
  }).catch(error => {
    console.error(error);
  })
Anyone can help me resolve this or provide some demo ?

Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>