title: Ora 06502 for apex_web_service.g_request_headers bearer token PLSQL
body: <p>I have a hard time to make a GET request form a server with Bearer token. To make a request I made a function which is down below and I'm getting error Ora-06512 in the line with bearer. Sending a request from postman is not a problem I recive my json response back. However with PLSQL I'm still not able to do that.</p>
  
  <p>My function</p>
  
  <pre><code>   FUNCTION get_response(ulr_path in varchar2)
          RETURN clob
          IS
             z clob;
             V_PARAM_NAMES    apex_application_global.vc_arr2;
             V_PARAM_VALUES   apex_application_global.vc_arr2;
          begin
          apex_web_service.g_request_headers(1).name    := 'Content-Type';
          apex_web_service.g_request_headers(1).VALUE   := 'application/json';
          apex_web_service.g_request_headers(2).name := 'Authorization';
          apex_web_service.g_request_headers(2).value := 'Bearer ' || TOKEN; --ORA 06512
          --apex_web_service.g_request_headers(2).name    := 'Accept';
          --apex_web_service.g_request_headers(2).VALUE   := '*/*';
          V_PARAM_NAMES(1)                              := 'fist_param_name';
          V_PARAM_VALUES(1)                             := 'first_param_value';
          V_PARAM_NAMES(2)                              := 'second_param_name';
          V_PARAM_VALUES(2)                             := 'second_param_value';
          z := APEX_WEB_SERVICE.make_rest_request(p_url               =&gt; ulr_path,
                                                   p_http_method      =&gt; 'GET',
                                                   p_proxy_override   =&gt; null,
                                                   p_transfer_timeout =&gt; 60, 
                                                   --p_password =&gt; HUMO_TOKEN,--
                                                   --p_body             =&gt; HUMO_TOKEN,                                                 
                                                   p_body_blob        =&gt; null,
                                                   p_parm_name        =&gt; V_PARAM_NAMES,
                                                   p_parm_value       =&gt; V_PARAM_VALUES
                                                   );
          RETURN z;
       END;
  </code></pre>
  
  <p>The postman curl (which is works perfectly fine) looks like this</p>
  
  <pre><code>curl --location --request GET 'http://huamoapay.mur.ru/api/servicea' \
  --header 'Authorization: Bearer really_long_string'
  </code></pre>
  
  <p>The error img
  <a href="https://i.stack.imgur.com/eXaYC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eXaYC.png" alt="enter image description here"></a></p>