Accept text/plain and text/html for raw output (#1330)

This commit is contained in:
Steve Chávez
2019-06-21 11:51:54 -05:00
committed by GitHub
parent 40ae7ce2b1
commit ea7d747107
8 changed files with 162 additions and 103 deletions
+17
View File
@@ -1713,3 +1713,20 @@ case current_setting('request.header.accept', true)
end case;
end
$_$ language plpgsql;
create or replace function welcome() returns text as $$
select 'Welcome to PostgREST'::text;
$$ language sql;
create or replace function "welcome.html"() returns text as $_$
select $$
<html>
<head>
<title>PostgREST</title>
</head>
<body>
<h1>Welcome to PostgREST</h1>
</body>
</html>
$$::text;
$_$ language sql;