diff --git a/lib/index.js b/lib/index.js index 9ba99dc..a8ee8f0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -108,7 +108,13 @@ function renderFile (root, obj) { } function renderUrl (obj) { - return rest(obj.url).then((res) => { return JSON.parse(transformRaw(obj, res.entity)) }) + const headers = Object.assign({'Content-Type':'application/json'}, obj.headers); + return rest({ + path: obj.url, + method: obj.method, + entity: JSON.stringify(obj.entity), + headers + }).then((res) => { return JSON.parse(transformRaw(obj, res.entity)) }) } function renderGraphql (obj) {