diff --git a/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php b/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php
index 5cd2ee3057..a0e0d2faa8 100644
--- a/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php
+++ b/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php
@@ -65,7 +65,7 @@ public function __construct(CsrfTokenGenerator $token_generator, ConfigFactoryIn
    * {@inheritdoc}
    */
   public function applies(RouteMatchInterface $route_match) {
-    $ajax_page_state = $this->requestStack->getCurrentRequest()->request->get('ajax_page_state');
+    $ajax_page_state = $this->requestStack->getCurrentRequest()->get('ajax_page_state');
     return !empty($ajax_page_state['theme']) && isset($ajax_page_state['theme_token']);
   }
 
@@ -73,7 +73,7 @@ public function applies(RouteMatchInterface $route_match) {
    * {@inheritdoc}
    */
   public function determineActiveTheme(RouteMatchInterface $route_match) {
-    $ajax_page_state = $this->requestStack->getCurrentRequest()->request->get('ajax_page_state');
+    $ajax_page_state = $this->requestStack->getCurrentRequest()->get('ajax_page_state');
     $theme = $ajax_page_state['theme'];
     $token = $ajax_page_state['theme_token'];
 
diff --git a/core/misc/ajax.es6.js b/core/misc/ajax.es6.js
index 119642dba7..66f8c5b761 100644
--- a/core/misc/ajax.es6.js
+++ b/core/misc/ajax.es6.js
@@ -311,6 +311,13 @@
           elementSettings.url = href;
           elementSettings.event = 'click';
         }
+        const type = $linkElement.data('ajax-type');
+        /**
+         * In case of setting custom ajax type for link we rewrite ajax.type.
+         */
+        if (type) {
+          elementSettings.type = type;
+        }  
         Drupal.ajax(elementSettings);
       });
   };
@@ -377,6 +384,7 @@
    */
   Drupal.Ajax = function(base, element, elementSettings) {
     const defaults = {
+      type: 'POST',
       event: element ? 'mousedown' : null,
       keypress: true,
       selector: base ? `#${base}` : null,
@@ -560,7 +568,7 @@
       },
       dataType: 'json',
       jsonp: false,
-      type: 'POST',
+      type: ajax.type
     };
 
     if (elementSettings.dialog) {
@@ -1226,7 +1234,7 @@
       let $newContent = $($.parseHTML(response.data, document, true));
       // For backward compatibility, in some cases a wrapper will be added. This
       // behavior will be removed before Drupal 9.0.0. If different behavior is
-      // needed, the theme functions can be overriden.
+      // needed, the theme functions can be overridden.
       // @see https://www.drupal.org/node/2940704
       $newContent = Drupal.theme(
         'ajaxWrapperNewContent',
diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index b817b77b05..d03f84bb61 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -147,12 +147,18 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
         elementSettings.url = href;
         elementSettings.event = 'click';
       }
+      var type = $linkElement.data('ajax-type');
+
+      if (type) {
+        elementSettings.type = type;
+      }
       Drupal.ajax(elementSettings);
     });
   };
 
   Drupal.Ajax = function (base, element, elementSettings) {
     var defaults = {
+      type: 'POST',
       event: element ? 'mousedown' : null,
       keypress: true,
       selector: base ? '#' + base : null,
@@ -244,7 +250,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
 
       dataType: 'json',
       jsonp: false,
-      type: 'POST'
+      type: ajax.type
     };
 
     if (elementSettings.dialog) {
