(options, callback)
| 271 | } |
| 272 | } |
| 273 | const post = (options, callback) => { |
| 274 | if (isQuanX) { |
| 275 | if (typeof options == "string") options = { url: options } |
| 276 | options["method"] = "POST" |
| 277 | $task.fetch(options).then(response => { |
| 278 | callback(null, adapterStatus(response), response.body) |
| 279 | }, reason => callback(reason.error, null, null)) |
| 280 | } |
| 281 | if (isSurge) { |
| 282 | $httpClient.post(options, (error, response, body) => { |
| 283 | callback(error, adapterStatus(response), body) |
| 284 | }) |
| 285 | } |
| 286 | if (node) { |
| 287 | node.request.post(options, (error, response, body) => { |
| 288 | callback(error, adapterStatus(response), body) |
| 289 | }) |
| 290 | } |
| 291 | } |
| 292 | return { isQuanX, isSurge, isResponse, notify, write, read, get, post } |
| 293 | } |
| 294 |
nothing calls this directly
no test coverage detected