Skip to content

Commit 3bbe42d

Browse files
committed
put image request options getter in tasks/util
1 parent 3a3382e commit 3bbe42d

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* For image testing
3+
*
4+
* Give it a json object for the body,
5+
* it'll return an options object ready for request().
6+
*/
7+
module.exports = function getOptions(body, url) {
8+
9+
var opts = {
10+
url: url || 'http://localhost:9010/',
11+
method: 'POST'
12+
};
13+
14+
if (body) opts.body = JSON.stringify(body);
15+
16+
return opts;
17+
};

test/image/tools/get-options.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)