How to use the delete function from superagent

Find comprehensive JavaScript superagent.delete code examples handpicked from public code repositorys.

134
135
136
137
138
139
140
141
142
if (method === 'GET') {
  req = request.get(url).withCredentials().query(body);
} else if (method === 'POST') {
  req = request.post(url).send(body);
} else if (method === 'DELETE') {
  req = request.delete(url).send(body);
}

req.set({ encoding: 'utf8', 'cache-control': 'no-cache', 'Content-Type': 'application/json' });
fork icon674
star icon0
watch icon247