original_string: public function requestServerData($uri, $postData = [])
      {
          $result = Http::post($this->createServerUrl($uri), function ($http) use ($postData) {
              $this->applyHttpAttributes($http, $postData);
          });
  
          if ($result->code == 404) {
              throw new ApplicationException(Lang::get('system::lang.server.response_not_found'));
          }
  
          if ($result->code != 200) {
              throw new ApplicationException(
                  strlen($result->body)
                  ? $result->body
                  : Lang::get('system::lang.server.response_empty')
              );
          }
  
          $resultData = false;
  
          try {
              $resultData = @json_decode($result->body, true);
          }
          catch (Exception $ex) {
              throw new ApplicationException(Lang::get('system::lang.server.response_invalid'));
          }
  
          if ($resultData === false || (is_string($resultData) && !strlen($resultData))) {
              throw new ApplicationException(Lang::get('system::lang.server.response_invalid'));
          }
  
          return $resultData;
      }
code: public function requestServerData($uri, $postData = [])
      {
          $result = Http::post($this->createServerUrl($uri), function ($http) use ($postData) {
              $this->applyHttpAttributes($http, $postData);
          });
  
          if ($result->code == 404) {
              throw new ApplicationException(Lang::get('system::lang.server.response_not_found'));
          }
  
          if ($result->code != 200) {
              throw new ApplicationException(
                  strlen($result->body)
                  ? $result->body
                  : Lang::get('system::lang.server.response_empty')
              );
          }
  
          $resultData = false;
  
          try {
              $resultData = @json_decode($result->body, true);
          }
          catch (Exception $ex) {
              throw new ApplicationException(Lang::get('system::lang.server.response_invalid'));
          }
  
          if ($resultData === false || (is_string($resultData) && !strlen($resultData))) {
              throw new ApplicationException(Lang::get('system::lang.server.response_invalid'));
          }
  
          return $resultData;
      }
code_tokens: public function requestServerData ( $ uri , $ postData = [ ] ) { $ result = Http :: post ( $ this -> createServerUrl ( $ uri ) , function ( $ http ) use ( $ postData ) { $ this -> applyHttpAttributes ( $ http , $ postData ) ; } ) ; if ( $ result -> code == 404 ) { throw new ApplicationException ( Lang :: get ( 'system::lang.server.response_not_found' ) ) ; } if ( $ result -> code != 200 ) { throw new ApplicationException ( strlen ( $ result -> body ) ? $ result -> body : Lang :: get ( 'system::lang.server.response_empty' ) ) ; } $ resultData = false ; try { $ resultData = @ json_decode ( $ result -> body , true ) ; } catch ( Exception $ ex ) { throw new ApplicationException ( Lang :: get ( 'system::lang.server.response_invalid' ) ) ; } if ( $ resultData === false || ( is_string ( $ resultData ) && ! strlen ( $ resultData ) ) ) { throw new ApplicationException ( Lang :: get ( 'system::lang.server.response_invalid' ) ) ; } return $ resultData ; }
docstring: Contacts the update server for a response.
  @param  string $uri      Gateway API URI
  @param  array  $postData Extra post data
  @return array
docstring_tokens: Contacts the update server for a response .