diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 7dc75f5..ef96e39 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1079,7 +1079,7 @@ function drupal_page_is_cacheable($allow_caching = NULL) {
     $allow_caching_static = $allow_caching;
   }
 
-  return $allow_caching_static && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD')
+  return $allow_caching_static && (\Drupal::request()->getMethod() == 'GET' || \Drupal::request()->getMethod() == 'HEAD')
     && !drupal_is_cli();
 }
 
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 4668a90..af226b6 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -5428,7 +5428,9 @@ function show(&$element) {
  * @see drupal_render_cache_set()
  */
 function drupal_render_cache_get($elements) {
-  if (!in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD')) || !$cid = drupal_render_cid_create($elements)) {
+  $REQUEST_METHOD = Drupal::request()->server->get('REQUEST_METHOD');
+
+  if (!in_array($REQUEST_METHOD, array('GET', 'HEAD')) || !$cid = drupal_render_cid_create($elements)) {
     return FALSE;
   }
   $bin = isset($elements['#cache']['bin']) ? $elements['#cache']['bin'] : 'cache';
@@ -5459,8 +5461,10 @@ function drupal_render_cache_get($elements) {
  * @see drupal_render_cache_get()
  */
 function drupal_render_cache_set(&$markup, $elements) {
+  $REQUEST_METHOD = Drupal::request()->server->get('REQUEST_METHOD');
+
   // Create the cache ID for the element.
-  if (!in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD')) || !$cid = drupal_render_cid_create($elements)) {
+  if (!in_array($REQUEST_METHOD, array('GET', 'HEAD')) || !$cid = drupal_render_cid_create($elements)) {
     return FALSE;
   }
 
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index f581599..4afc336 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -220,7 +220,8 @@ function _drupal_log_error($error, $fatal = FALSE) {
     }
   }
 
-  if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
+  $HTTP_X_REQUESTED_WITH = Drupal::request()->server->get('HTTP_X_REQUESTED_WITH');
+  if (isset($HTTP_X_REQUESTED_WITH) && $HTTP_X_REQUESTED_WITH == 'XMLHttpRequest') {
     if ($fatal) {
       if (error_displayable($error)) {
         // When called from JavaScript, simply output the error message.
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 84dd851..ab97e2d 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -893,7 +893,7 @@ function install_goto($path) {
  * @see drupal_requirements_url()
  */
 function drupal_current_script_url($query = array()) {
-  $uri = $_SERVER['SCRIPT_NAME'];
+  $uri = Drupal::request()->server->get('SCRIPT_NAME');
   $query = array_merge(drupal_get_query_parameters(), $query);
   if (!empty($query)) {
     $uri .= '?' . drupal_http_build_query($query);
diff --git a/core/lib/Drupal/Component/Utility/Crypt.php b/core/lib/Drupal/Component/Utility/Crypt.php
index 9fec8b5..2196186 100644
--- a/core/lib/Drupal/Component/Utility/Crypt.php
+++ b/core/lib/Drupal/Component/Utility/Crypt.php
@@ -31,7 +31,7 @@ public static function randomBytes($count) {
     // Initialize on the first call. The contents of $_SERVER includes a mix of
     // user-specific and system information that varies a little with each page.
     if (!isset($random_state)) {
-      $random_state = print_r($_SERVER, TRUE);
+      $random_state = print_r(\Drupal::request()->server, TRUE);
       if (function_exists('getmypid')) {
         // Further initialize with the somewhat random PHP process ID.
         $random_state .= getmypid();
diff --git a/core/lib/Drupal/Core/Utility/SchemaCache.php b/core/lib/Drupal/Core/Utility/SchemaCache.php
index 3c252b1..cd69e49 100644
--- a/core/lib/Drupal/Core/Utility/SchemaCache.php
+++ b/core/lib/Drupal/Core/Utility/SchemaCache.php
@@ -19,7 +19,9 @@ class SchemaCache extends CacheArray {
    */
   public function __construct() {
     // Cache by request method.
-    parent::__construct('schema:runtime:' . ($_SERVER['REQUEST_METHOD'] == 'GET'), 'cache', array('schema' => TRUE));
+
+    $REQUEST_METHOD = \Drupal::request()->getMethod();
+    parent::__construct('schema:runtime:' . ($REQUEST_METHOD == 'GET'), 'cache', array('schema' => TRUE));
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Utility/ThemeRegistry.php b/core/lib/Drupal/Core/Utility/ThemeRegistry.php
index eb2dd80..4640634 100644
--- a/core/lib/Drupal/Core/Utility/ThemeRegistry.php
+++ b/core/lib/Drupal/Core/Utility/ThemeRegistry.php
@@ -49,7 +49,8 @@ function __construct($cid, $bin, $tags, $modules_loaded = FALSE) {
     $this->cid = $cid;
     $this->bin = $bin;
     $this->tags = $tags;
-    $this->persistable = $modules_loaded && $_SERVER['REQUEST_METHOD'] == 'GET';
+    $REQUEST_METHOD = \Drupal::request()->getMethod();
+    $this->persistable = $modules_loaded && $REQUEST_METHOD == 'GET';
 
     $data = array();
     if ($this->persistable && $cached = cache($this->bin)->get($this->cid)) {
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index d94ec3b..6808aa4 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -315,7 +315,7 @@ function _block_get_renderable_region($list = array()) {
   // to other users. We therefore exclude user 1 from block caching.
   $not_cacheable = $GLOBALS['user']->uid == 1 ||
     count(module_implements('node_grants')) ||
-    !in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD'));
+    !in_array(\Drupal::request()->getMethod(), array('GET', 'HEAD'));
 
   foreach ($list as $key => $block) {
     $settings = $block->get('settings');
diff --git a/core/modules/openid/openid.inc b/core/modules/openid/openid.inc
index 8d5aae9..9946666 100644
--- a/core/modules/openid/openid.inc
+++ b/core/modules/openid/openid.inc
@@ -566,11 +566,12 @@ function _openid_get_bytes($num_bytes) {
 
 function _openid_response($str = NULL) {
   $data = array();
+  $method = \Drupal::request()->getMethod();
 
-  if (isset($_SERVER['REQUEST_METHOD'])) {
+  if (isset($method)) {
     $data = _openid_get_params($_SERVER['QUERY_STRING']);
 
-    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+    if (\Drupal::request()->getMethod() == 'POST') {
       $str = file_get_contents('php://input');
 
       $post = array();
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
index 31e4f34..45fb357 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php
@@ -139,7 +139,7 @@ function testDrupalRenderSorting() {
    */
   function testDrupalRenderChildrenAttached() {
     // The cache system is turned off for POST requests.
-    $request_method = $_SERVER['REQUEST_METHOD'];
+    $request_method = \Drupal::request()->getMethod();
     $_SERVER['REQUEST_METHOD'] = 'GET';
 
     // Create an element with a child and subchild.  Each element loads a
