Skip to content

Commit

Permalink
Parameters in header by GET
Browse files Browse the repository at this point in the history
Example of how to pass parameters in the header by GET
  • Loading branch information
jadsonbr authored Feb 22, 2017
1 parent 70fbafa commit c4fb135
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ This extension is for that.
----------------------------------------------
<html><body><h1>It works!</h1></body></html>
(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');

Expand Down

0 comments on commit c4fb135

Please sign in to comment.