Code Monkey home page Code Monkey logo

Comments (4)

godfat avatar godfat commented on September 15, 2024 1

Oh, I was just about to say that I released rest-builder 0.9.2 :)

Thank you for confirming and using rest-core.

from rest-core.

godfat avatar godfat commented on September 15, 2024

I remembered that I once touched this, because I realized that DELETE shouldn't have any payload according to the specification.

However if that works, and people need it, I don't mind to support it. Could you please see if this patch would work for you?

diff --git a/lib/rest-builder/middleware.rb b/lib/rest-builder/middleware.rb
index 230da59..aa16fed 100644
--- a/lib/rest-builder/middleware.rb
+++ b/lib/rest-builder/middleware.rb
@@ -1,7 +1,7 @@
 
 module RestBuilder
   module Middleware
-    METHODS_WITH_PAYLOAD = [:post, :put, :patch]
+    METHODS_WITH_PAYLOAD = [:post, :put, :patch, :delete]
 
     def self.included mod
       mod.send(:attr_reader, :app)

Note that this is now implemented in https://github.com/godfat/rest-builder so you'll need to apply the patch there. Let me know if you don't know how to patch it.

from rest-core.

AshwiniDoddamaniFluke avatar AshwiniDoddamaniFluke commented on September 15, 2024

Yes. I was able to patch that in rest-builder & DELETE is working perfectly with the change. It is needed for us to perform batch deletions where we wish to send bulk Ids in the REQUEST_PAYLOAD.

from rest-core.

AshwiniDoddamaniFluke avatar AshwiniDoddamaniFluke commented on September 15, 2024

Thank you very much for the release. You are simply amazing!

from rest-core.

Related Issues (18)

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.