WITH
http AS (
SELECT * FROM http_get('http://httpbin.org/image/png') -- works, but no other url I does...
),
headers AS (
SELECT (unnest(headers)).* FROM http
)
SELECT
http.content_type,
length(textsend(http.content)) AS length_binary,
headers.value AS length_headers
FROM http, headers
WHERE field = 'Content-Length';
WITH
http AS (
SELECT * FROM http_get('http://httpbin.org/image/png') -- works, but no other url I does...
),
headers AS (
SELECT (unnest(headers)).* FROM http
)
SELECT
http.content_type,
length(textsend(http.content)) AS length_binary,
headers.value AS length_headers
FROM http, headers
WHERE field = 'Content-Length';