title: Oracle Error ORA-29273: HTTP request failed ORA-29259: end-of-input reached When Calling UTL_HTTP.request
body: <p>I am trying to call a web service using the Oracle <code>UTL_HTTP.request</code> API. The call requires a proxy &amp; wallet/certificate. I believe I have cleared up the certificate issues, since I no longer get a <code>ORA-29024: Certificate validation failure</code> error. Now I am getting <code>ORA-29259: end-of-input reached</code> error. I am using DBMS version 12.1.0.2.0, and should be using TLS 1.2 (not sure how to verify this).</p>
  
  <p>The following call works perfectly &amp; returns a JSON payload:</p>
  
  <pre><code>SELECT utl_http.request (
    'http://jsonplaceholder.typicode.com/todos/1',
    'proxy.myurl.com')
  FROM dual;
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>{
    "userId": 1,
    "id": 1,
    "title": "delectus aut autem",
    "completed": false
  }
  </code></pre>
  
  <p>The following call throws the ORA-29259 error:</p>
  
  <pre><code>SELECT utl_http.request (
    'https://service.baseurl.com/ping',
    'proxy.myurl.com',
    'file:/my/wallet/location',
    'mypassword'
   )
  FROM DUAL;
  </code></pre>
  
  <p>Runtime exception stack:</p>
  
  <pre><code>ORA-29273: HTTP request failed
  ORA-29259: end-of-input reached
  ORA-06512: at "SYS.UTL_HTTP", line 1491
  ORA-06512: at line 1
  </code></pre>
  
  <p>I have also tried calling <code>UTL_HTTP.begin_request</code> using an anonymous PL/SQL block, but get essentially the same <code>ORA-29259</code> error as above.</p>
  
  <pre><code>DECLARE
    l_http_request utl_http.req;
    l_http_response utl_http.resp;
    l_text VARCHAR2(32767);
  BEGIN
    utl_http.set_proxy('proxy.myurl.com');
    utl_http.set_wallet('file:/my/wallet/location'
                        ,'mypassword');
    l_http_request := utl_http.begin_request('https://service.baseurl.com/ping' 
                                             ,'POST', 'HTTP/1.1');
    l_http_response := utl_http.get_response(l_http_request);
    BEGIN
      LOOP
        utl_http.read_text(l_http_response, l_text, 32766);
        dbms_output.put_line(l_text);
      END LOOP;
    EXCEPTION WHEN utl_http.end_of_body THEN
      utl_http.end_response(l_http_response);
    END;
  END;
  
  ORA-29273: HTTP request failed
  ORA-29259: end-of-input reached
  ORA-06512: at "SYS.UTL_HTTP", line 1258
  ORA-06512: at line 10
  </code></pre>
  
  <p>Any ideas on what could be causing this error?</p>