kibana/x-pack/plugins
Frank Hassanabad 2e28683c12
Change DELETE to POST for _bulk_delete to avoid incompatibility issues (#87914)
## Summary

Changes `DELETE` to `POST` for _bulk_delete on the client only for a variety of reasons.

According to the RFC, not all servers and proxies need to honor DELETE having a body. From: https://tools.ietf.org/html/rfc7231

```
A payload within a DELETE request message has no defined semantics;
sending a payload body on a DELETE request might cause some existing
implementations to reject the request.
```

Within at least one proxy, h2o2, we have found that it does indeed change request headers which will cause NodeJS to not attach the body of a `DELETE`:
https://github.com/hapijs/h2o2/issues/124

Also from other communities such as OpenAPI where they debated this, they allow it but discourage it for reasons outlined there that I will not repeat here:
https://github.com/OAI/OpenAPI-Specification/pull/1937

Elastic Search API's and other Kibana API's use `POST` rather than `DELETE` for their bodies that are attached to `DELETE`:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html

We still support bodies in `DELETE` and `POST` but are just changing the web client to utilize `POST` moving forward.


### Checklist

Reviewed and we already have unit tests and end to end tests for these use cases so we are good with just updating them. 

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-01-15 11:45:04 -07:00
..
actions Bumped axios to 0.21.1 (#87776) 2021-01-13 19:41:31 +00:00
alerting_builtins Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
alerts Remove dependency between alerts and infra (#88342) 2021-01-15 08:44:28 -06:00
apm [APM] Consistent terminology for latency and throughput (#88452) 2021-01-15 19:33:38 +01:00
audit_trail Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
beats_management chore(NA): move beats_management plugin tests out of __tests__ folder (#87530) 2021-01-06 19:56:38 +00:00
canvas [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
case [Security Solution][Case] Attach alerts to cases: Tests (#86305) 2021-01-11 17:44:35 +02:00
cloud Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
code Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
console_extensions [DX] move some ES UI plugins to TS project (#88050) 2021-01-13 21:58:34 +01:00
cross_cluster_replication [Telemetry] Introduce UI Counters (#84224) 2020-12-04 17:47:04 +02:00
dashboard_enhanced Kibana app and presentation ts projects (#87639) 2021-01-12 17:33:07 +01:00
dashboard_mode Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
data_enhanced [Search Sessions] Replace search session constants with kibana.yml configs (#88023) 2021-01-15 01:14:02 +02:00
discover_enhanced Migrate most kibana app plugins to TS projects (#87636) 2021-01-13 17:15:41 +01:00
drilldowns Remove dynamic mapped types from UiActions (#87075) 2021-01-05 10:11:05 +01:00
embeddable_enhanced Migrate App services plugins to TS projects (#87294) 2021-01-07 09:30:30 +01:00
encrypted_saved_objects Move Spaces, Security and EncryptedSavedObjects plugins to separate TS projects (#88365) 2021-01-15 14:55:53 +01:00
enterprise_search [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
event_log [EventLog] Added event log API to get events for multiple saved objects. (#87596) 2021-01-12 16:25:23 -08:00
features [Search][Sessions] Rename Background Sessions to Search Sessions (#87500) 2021-01-07 17:28:27 +02:00
file_upload [Maps][File upload] Fix geojson upload diacritic handling (#83122) 2020-12-15 17:31:49 -07:00
fleet Don't retry if icon isn't in initial response (#88403) 2021-01-15 09:33:19 -05:00
global_search [GS] add tag and dashboard suggestion results (#85144) 2020-12-09 11:05:59 +01:00
global_search_bar [GS] adding tags UI to search results (#85084) 2020-12-10 11:16:21 -06:00
global_search_providers [DX] SavedObjectsManagement to TS project (#88240) 2021-01-13 22:23:06 +01:00
graph [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
grokdebugger chore(NA): move grokdebugger plugin test fixtures out of __tests__ folder (#87765) 2021-01-08 16:23:55 +00:00
index_lifecycle_management [ILM] Absolute to relative time conversion (#87822) 2021-01-15 13:32:16 +01:00
index_management [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
infra [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
ingest_manager Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
ingest_pipelines [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
lens [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
license_management Use documentation link service for security links (#87409) 2021-01-12 08:40:10 -08:00
licensing Migrate App services plugins to TS projects (#87294) 2021-01-07 09:30:30 +01:00
lists [Security Solution] [Detections] Fix bug to allow lower privileged users to close alerts (#87761) 2021-01-12 21:16:06 -05:00
logstash [logstash] remove "upgrade" functionality now that .logstash is a system index (#87056) 2020-12-31 12:16:33 -07:00
maps [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
maps_legacy_licensing
ml [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
monitoring [Monitoring] Change cloud messaging on no data page (#88375) 2021-01-15 13:43:27 -05:00
observability [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
painless_lab Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
remote_clusters [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
reporting chore(NA): move reporting plugin test fixtures out of __tests__ folder (#87888) 2021-01-12 02:44:07 +00:00
rollup Switches rollup usage collector's fetch es client to the new client (#86684) 2021-01-04 11:32:14 -07:00
runtime_fields revert runtime fields editor plugin (#88132) 2021-01-13 08:34:30 -06:00
saved_objects_tagging [SO Tagging] Update tag delete modal confirmation title (#85997) 2020-12-15 21:41:47 +01:00
searchprofiler [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
security Move Spaces, Security and EncryptedSavedObjects plugins to separate TS projects (#88365) 2021-01-15 14:55:53 +01:00
security_solution Change DELETE to POST for _bulk_delete to avoid incompatibility issues (#87914) 2021-01-15 11:45:04 -07:00
snapshot_restore [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
spaces Move Spaces, Security and EncryptedSavedObjects plugins to separate TS projects (#88365) 2021-01-15 14:55:53 +01:00
stack_alerts Change some UI copy to reflect guidelines and feedback (#88215) 2021-01-14 14:13:03 -05:00
task_manager [Alerting] Shift polling interval by random amount when Task Manager experiences consistent claim version conflicts (#88020) 2021-01-12 23:34:07 +00:00
telemetry_collection_xpack Add bulk assign action to tag management (#84177) 2020-12-07 11:18:43 +01:00
transform [dev] Replace sass-lint with stylelint (#86177) 2021-01-15 11:52:29 -06:00
translations [Monitoring] Change cloud messaging on no data page (#88375) 2021-01-15 13:43:27 -05:00
triggers_actions_ui Change some UI copy to reflect guidelines and feedback (#88215) 2021-01-14 14:13:03 -05:00
ui_actions_enhanced Migrate App services plugins to TS projects (#87294) 2021-01-07 09:30:30 +01:00
upgrade_assistant Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
uptime [Uptime] clear ping state when PingList component in unmounted (#88321) 2021-01-15 13:37:30 -05:00
vis_type_timeseries_enhanced Migrate most kibana app plugins to TS projects (#87636) 2021-01-13 17:15:41 +01:00
watcher [Watcher] Update skipped jest tests (#88225) 2021-01-14 09:00:18 -05:00
xpack_legacy Migrates elasticsearch client in the settings usage collector (#86397) 2020-12-18 10:53:34 -07:00