UNPKG
ghunti-devour-client
Version:
latest (2.0.6)
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
A lightweight, framework agnostic, flexible JSON API client
github.com/twg/devour
ghunti/devour
ghunti-devour-client
/
lib
/
middleware
/
json-api
/
req-get.js
16 lines
(14 loc)
•
320 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict'
;
module
.
exports
= {
name
:
'GET'
,
req
:
function
req
(
payload
) {
if
(payload.
req
.
method
===
'GET'
) { payload.
req
.
headers
= {
'Content-Type'
:
'application/vnd.api+json'
,
'Accept'
:
'application/vnd.api+json'
};
delete
payload.
req
.
data
; }
return
payload; } };