diff --git a/expected/http.out b/expected/http.out index deee970..1e4022b 100644 --- a/expected/http.out +++ b/expected/http.out @@ -51,10 +51,10 @@ FROM http_get('https://httpbin.org/anything', jsonb_build_object('this', 'that') -- GET with data SELECT status, content::json->'args' as args, -content::json->>'data' as data, +(content::json)->>'data' as data, content::json->'url' as url, content::json->'method' as method -from http(('GET', 'https://httpbin.org/anything', NULL, 'application/json', '{"search": "toto"}')); +FROM http(('GET', 'https://httpbin.org/anything', NULL, 'application/json', '{"search": "toto"}')); status | args | data | url | method --------+------+--------------------+--------------------------------+-------- 200 | {} | {"search": "toto"} | "https://httpbin.org/anything" | "GET" @@ -156,7 +156,7 @@ WHERE field ILIKE 'Abcde'; -- Follow redirect SELECT status, -content::json->'url' AS url +(content::json)->'url' AS url FROM http_get('https://httpbin.org/redirect-to?url=get'); status | url --------+--------------------------- diff --git a/sql/http.sql b/sql/http.sql index 5668bc2..350da2c 100644 --- a/sql/http.sql +++ b/sql/http.sql @@ -101,7 +101,7 @@ WHERE field ILIKE 'Abcde'; -- Follow redirect SELECT status, -content::json->'url' AS url +(content::json)->'url' AS url FROM http_get('https://httpbin.org/redirect-to?url=get'); -- Request image