Questions tagged [x-http-method-override]

HTTP method override by adding "X-HTTP-Method-Override: {VERB}" HTTP Header to POST requests

Many HTTP clients do not support HTTP PUT and HTTP DELETE verbs. To work around this, HTTP client libraries and clients can add the verb to an HTTP "X-HTTP-Method-Override" header and send this header with an HTTP POST request to achieve the same effect.

22 questions
56
votes
2 answers

Django Test Client Method Override Header

I am trying to test my update method on my viewset. The viewset is a modelviewset taken from drf. To update i would need to send a put request. As this is not always supported there are 2 ways to tell the server i am making a put request, the first…
Iwan1993
  • 1,669
  • 2
  • 17
  • 25
25
votes
3 answers

REST request cannot be encoded for GET (URL too long)

Example: URL: http://example.com/collection/a%20search%20term Method: GET Response: All items in collection matching a search term. Problem: The search term may be so long that it breaks the web server's maximum URL length. How do I allow…
feklee
  • 7,555
  • 9
  • 54
  • 72
4
votes
1 answer

Symfony2 & phpunit: enable method override

I just started on a Symfony2 project. The CRUD generation tool created a default controller and functional test, which I'm modifying to suit my needs. The edit-form generated by the controller creates the following HTML:
Martijn
  • 5,491
  • 4
  • 33
  • 41
3
votes
1 answer

Firebase x-http-method-override parameter ignored

HTTP POST requests using ?x-http-method-override=PATCH are being processed as POST instead of PATCH calls on the Firebase REST API. This has started happening some time in the last two weeks. The Firebase documentation still mentions this parameter,…
3
votes
2 answers

AngularJs http method override PUT-POST

IS there a way to do the http method override with angular's $resource service using the X-HTTP-Method-Override or a _method param in the request?
rascio
  • 8,968
  • 19
  • 68
  • 108
2
votes
1 answer

Nodejs Express - methodOverride not working for multipart/form-data

I've noticed that if I submit a form with enctype="multipart/form-data" that has a hidden _method input set to PUT the methodOverride function will not fire, resulting in a 404 POST for that route. The set…
1
vote
1 answer

How do I pass X-HTTP-METHOD-Override Header to C#s HttpClient

I try to update a field using REST in C#. Using PatchAsync did not work so far, so I'm trying to use PUT instead, but now I need to pass the X-HTTP-METHOD-Override Header and I have no idea how to do this. I've looked at the available headers for…
Dominik
  • 116
  • 10
1
vote
1 answer

Java and MS CRM 2016 Web API Updates

i have a java application and i am trying to update an opportunity via the crm web api. When i try to use a Non-Standard HTTP Method like PATCH (which is neccessary for the update) and override it with the "X-HTTP-Method-Override" like i found it in…
1
vote
1 answer

How to avoid using CONNECT http method while in CXF library (SOAP)

I am writing a SOAP client using CXF library and here my requirement is to divert the SOAP request to another web service which is acting as a proxy for me.I have used the following code to set up the proxy in my SOAP client WebService ss = new…
swapnil
  • 21
  • 1
  • 2
0
votes
0 answers

curl -I -X GET url fetch the body and discards it after fetching or does it just get the header without fetching the body

While reading about curl I learned that -I will issue the HEAD method, and that it is possible to override any method using the -X argument... for example: curl -I -X GET https://some-valid-url will show the header but will use the GET method and…
Ouss
  • 2,912
  • 2
  • 25
  • 45
0
votes
1 answer

Why do I get a 404 status to my PUT and DELETE requests?

I am working on a MEN back-end app and in my in express client router I declared PUT and DELETE request but they show a status 404 not found. although the POST request is working just fine Is it a method-override error or else ?? this is my…
0
votes
1 answer

How do I ensure that X-HTTP-Method headers are ignored?

I'm currently applying security fixes for a vulnerability which was found by a third party software. This is the issue (Often Misused: HTTP Method Override vulnerability). The request from the software was similar to: POST /Home/ViewProfile…
0
votes
0 answers

How to fix Cannot PUT /blogs/:id

I am making RESTful BlogApp and PUT method is not working.I only get error saying Cannot PUT /blogs/:id. I don't see what could go wrong. Everything looks fine to me. Please let me know if you find a problem. I know this might be a bad post but it…
0
votes
1 answer

Not able to iterate object array id inside of handlebars url method - node.js

Experimenting with REST http methods in node.js using method-override package, express and express-handlebars. Oddly, I am able to loop through an array of objects using handlebars, but when I try to assign the specific id to the url method it will…
0
votes
1 answer

What is usage of method rest.use(methodOverride()) in node.js?

In nodejs applications i found method-override module and the project which i am studing contains this code var methodOverride=require('method-override'); and after creating rest server rest.use(methodOverride()) It seems like it is a middleware.…
Devdutta Goyal
  • 985
  • 2
  • 11
  • 27
1
2