我在我的Oracle实例上运行此代码。但它给了我错误:400(BAD REQUEST)
SET SERVEROUTPUT ON
DECLARE
req utl_http.req;
res utl_http.resp;
url varchar2(4000) := 'http://ec2-52-203-125-18.compute-1.amazonaws.com/test.php';
begin
req := utl_http.begin_request(url, 'GET','HTTP/1.1');
res := utl_http.get_response(req);
DBMS_OUTPUT.put_line('Response status code: ' || res.status_code);
DBMS_OUTPUT.put_line('Response status code: ' || res.reason_phrase);
exception
when others then
utl_http.end_response(res);
end;
/
您能否告诉我我的代码有什么问题?