original_string: private function post($route = '', array $body = [])
      {
          // Don't send requests in debug mode.
          if ($this->config['debug']) {
              return;
          }
  
          $contents = http_build_query($body);
          $parts = parse_url($this->url.'/'.$route);
  
          $err_num = null;
          $err_str = null;
          $fp = fsockopen($parts['host'], isset($parts['port']) ? $parts['port'] : 80, $err_num, $err_str, 30);
  
          // Y'know back in my day we had to write our HTTP requests by
          // hand, and uphill both ways. Now these kids with their Guzzles...
          $out = 'POST '.$parts['path'].' HTTP/1.1'."\r\n";
          $out .= 'Host: '.$parts['host']."\r\n";
          $out .= 'Content-Type: application/x-www-form-urlencoded'."\r\n";
          $out .= 'Content-Length: '.strlen($contents)."\r\n";
          $out .= 'Connection: Close'."\r\n\r\n";
          if (isset($contents)) {
              $out .= $contents;
          }
  
          // Fly away, little packet!
          fwrite($fp, $out);
          fclose($fp);
      }
code: private function post($route = '', array $body = [])
      {
          // Don't send requests in debug mode.
          if ($this->config['debug']) {
              return;
          }
  
          $contents = http_build_query($body);
          $parts = parse_url($this->url.'/'.$route);
  
          $err_num = null;
          $err_str = null;
          $fp = fsockopen($parts['host'], isset($parts['port']) ? $parts['port'] : 80, $err_num, $err_str, 30);
  
          // Y'know back in my day we had to write our HTTP requests by
          // hand, and uphill both ways. Now these kids with their Guzzles...
          $out = 'POST '.$parts['path'].' HTTP/1.1'."\r\n";
          $out .= 'Host: '.$parts['host']."\r\n";
          $out .= 'Content-Type: application/x-www-form-urlencoded'."\r\n";
          $out .= 'Content-Length: '.strlen($contents)."\r\n";
          $out .= 'Connection: Close'."\r\n\r\n";
          if (isset($contents)) {
              $out .= $contents;
          }
  
          // Fly away, little packet!
          fwrite($fp, $out);
          fclose($fp);
      }
code_tokens: private function post ( $ route = '' , array $ body = [ ] ) { // Don't send requests in debug mode. if ( $ this -> config [ 'debug' ] ) { return ; } $ contents = http_build_query ( $ body ) ; $ parts = parse_url ( $ this -> url . '/' . $ route ) ; $ err_num = null ; $ err_str = null ; $ fp = fsockopen ( $ parts [ 'host' ] , isset ( $ parts [ 'port' ] ) ? $ parts [ 'port' ] : 80 , $ err_num , $ err_str , 30 ) ; // Y'know back in my day we had to write our HTTP requests by // hand, and uphill both ways. Now these kids with their Guzzles... $ out = 'POST ' . $ parts [ 'path' ] . ' HTTP/1.1' . "\r\n" ; $ out .= 'Host: ' . $ parts [ 'host' ] . "\r\n" ; $ out .= 'Content-Type: application/x-www-form-urlencoded' . "\r\n" ; $ out .= 'Content-Length: ' . strlen ( $ contents ) . "\r\n" ; $ out .= 'Connection: Close' . "\r\n\r\n" ; if ( isset ( $ contents ) ) { $ out .= $ contents ; } // Fly away, little packet! fwrite ( $ fp , $ out ) ; fclose ( $ fp ) ; }
docstring: Perform an asynchronous POST request to the given route.
  
  @param string $route
  @param array $body
docstring_tokens: Perform an asynchronous POST request to the given route .