procedure SEND_HTTP_REQUEST(url in varchar2, querryStr in varchar2 , v_label in varchar2,v_return  out varchar2)is
        req Utl_Http.Req;
        resp Utl_Http.Resp;
        name varchar2(255);
        value varchar2(1023);
        v_msg varchar2(100) := NULL;
        v_result varchar2(20000) := NULL;
      
        v_url varchar2(32767) := url|| '?'||querryStr;
      Begin        Utl_Http.Set_Response_Error_Check ( enable => true );
        Utl_Http.Set_Detailed_Excp_Support ( enable => true );        req := Utl_Http.Begin_Request (
          v_url ) ; 
          
        utl_http.set_header(r =>req,name =>'Content-Type',value =>'text/html');
        resp := Utl_Http.Get_Response ( r => req ); --报错了 报错信息不知道怎么看?是不是哪里需要设置下呢

解决方案 »

  1.   

    你没写end; 吧SQL>  create or replace procedure SEND_HTTP_REQUEST(url       in varchar2,
      2                              querryStr in varchar2,
      3                              v_label   in varchar2,
      4
      5                              v_return  out varchar2) is
      6    req      Utl_Http.Req;
      7    resp     Utl_Http.Resp;
      8    name     varchar2(255);
      9    value    varchar2(1023);
     10    v_msg    varchar2(100) := NULL;
     11    v_result varchar2(20000) := NULL;
     12
     13    v_url varchar2(32767) := url || '?' || querryStr;
     14  Begin
     15
     16    Utl_Http.Set_Response_Error_Check(enable => true);
     17    Utl_Http.Set_Detailed_Excp_Support(enable => true);
     18
     19    req := Utl_Http.Begin_Request(v_url);
     20
     21    utl_http.set_header(r     => req,
     22                        name  => 'Content-Type',
     23                        value => 'text/html');
     24    resp := Utl_Http.Get_Response(r => req);
     25    end;
     26  /Procedure created.SQL> show error
    No errors.
    SQL>