From c4fb135308c6433ef36f85c1332c941cf6c80919 Mon Sep 17 00:00:00 2001 From: Jadson Ribeiro Date: Wed, 22 Feb 2017 11:43:19 -0300 Subject: [PATCH] Parameters in header by GET Example of how to pass parameters in the header by GET --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 142313c..870cccb 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,18 @@ This extension is for that. ----------------------------------------------

It works!

(1 row) - + + > SELECT content::json->>'field' FROM http(( + 'GET', + 'http://localhost/v1/products/list', + ARRAY[http_header('Authorization','Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9')], + NULL, + NULL + )::http_request) + content + ---------------------------------------------- + my value field + (1 row) > SELECT status, content_type, content FROM http_get('http://localhost');