HTTP Request - Support other custom HTTP methods - MERGE
See original GitHub issueI’m submitting a …
[x] feature request
Current behavior Unable to use HTTP MERGE method/verb. throws new Error(‘Invalid request method. The method “${method}” is not supported.’);
According to:
if (typeof method !== 'string') return method;
switch (method.toUpperCase()) {
case 'GET':
return RequestMethod.Get;
case 'POST':
return RequestMethod.Post;
case 'PUT':
return RequestMethod.Put;
case 'DELETE':
return RequestMethod.Delete;
case 'OPTIONS':
return RequestMethod.Options;
case 'HEAD':
return RequestMethod.Head;
case 'PATCH':
return RequestMethod.Patch;
}
throw new Error(`Invalid request method. The method "${method}" is not supported.`);
}
https://github.com/angular/angular/blob/4.0.0/packages/http/src/http_utils.ts
Expected behavior Either:
- Support HTTP MERGE method/verb in enum
- Don’t block (throw error) if a ‘custom’ method not pre-defined is used.
What is the motivation / use case for changing the behavior? Whilst the library HTTP methods are compliant with the RFC https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html:
Not all established REST API’s on the web fully conform. For example, Microsoft Azure Table Storage (a NoSQL database) which uses MERGE.https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/merge-entity
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
HTTP POST and MERGE (update) - Progress Documentation
Update an entity using the custom X-HTTP-Method header with a value of MERGE . The body of the request should contain an entity...
Read more >Custom HTTP Methods == More Flexibility and Autonomy
Custom HTTP Methods == More Flexibility and Autonomy · Click the method dropdown menu, you'll see the method name highlighted · Start typing...
Read more >[MS-ODATA]: PATCH/MERGE | Microsoft Learn
Data services support two types of update operations: merge and replace ... The remainder of this section defines a custom HTTP MERGE method...
Read more >HTTP request methods - MDN Web Docs
Chrome Edge
CONNECT Full support. ChromeYes. Toggle history Full support. Edge12. Toggle history
DELETE Full support. ChromeYes. Toggle history Full support. Edge12. Toggle history
GET Full...
Read more >Support for HTTP "MERGE" verb in Play! Framework 2.1?
MERGE won't be supported because it is not a valid HTTP method. In order to use an arbitrary HTTP method in your request,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hello @murraybauer,
This is currently planned for upcoming HTTP APIs.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.