Code Monkey home page Code Monkey logo

Comments (8)

koltyakov avatar koltyakov commented on July 3, 2024 1

Please check is [email protected] works for you?

from sp-rest-proxy.

koltyakov avatar koltyakov commented on July 3, 2024 1

[email protected] - this should not rewrite a Digest header.

from sp-rest-proxy.

magnobiet avatar magnobiet commented on July 3, 2024 1

It's working. Thank you for the quick support.

from sp-rest-proxy.

koltyakov avatar koltyakov commented on July 3, 2024

Hi there,

SharePoint REST API doesn't use DETELE HTTP verb, but POST with X-HTTP-Method: "DELETE" header.

Please double check.

from sp-rest-proxy.

magnobiet avatar magnobiet commented on July 3, 2024

Directly on SharePoint, we are using the DELETE method and works perfectly for this case.

SharePoint

Proxy

If it makes sense for the project to implement the DELETE method will be very useful.

from sp-rest-proxy.

koltyakov avatar koltyakov commented on July 3, 2024

Oh, didn't know they added non POST methods support. Historically, it was 10+ years POST + X-HTTP-Method.
Will take a look.

from sp-rest-proxy.

magnobiet avatar magnobiet commented on July 3, 2024

Thank you @koltyakov, it works. But, now the response returns a 403 Forbidden.

We manually copy the __REQUESTDIGEST input from the original SharePoint site, but without effect for now.

We continue to investigate that. If you have some idea, we appreciate that.

REQUEST

Request URL: https://localhost:4200/.../_api/web/lists/GetByTitle('Components')/Items(1)/AttachmentFiles/GetByFileName('logo.png')
Request Method: DELETE
Status Code: 403 Forbidden
X-RequestDigest: 0x...,19 Nov 2021 11:19:04 -0000

from sp-rest-proxy.

koltyakov avatar koltyakov commented on July 3, 2024

@magnobiet, could you also try deleting attachment with a common (for SharePoint) approach (https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest)?

from sp-rest-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.