plsqlmod-plsql

setting http response header in mod pl/sql


I have a mod pl/sql procedure with which I want to return a responce with a HTTP status code set to 404. When sending a response via htp.p the HTTP status code is I believe by default set to 200.

How could this be done?


Solution

  • Call OWA_UTIL.status_line instead:

    owa_util.status_line(nstatus=>404, creason=>'Not Found', bclose_header=>true);
    

    http://docs.oracle.com/database/121/ARPLS/w_util.htm#ARPLS70790