api-client-wrapper
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "api-client-wrapper", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Easy to use REST client that manage all the basics out of the box: Response homogenization, bulk calls, simultaneos calls, timeout and error management.", | ||
@@ -5,0 +5,0 @@ "author": "Roberto Langarica <roberto.langarica@gmail.com>", |
const uuidv4 = require('uuid/v4'); | ||
export default class RequestObject { | ||
static Status = { | ||
waiting:0, | ||
executing:1, | ||
completed:2, | ||
failed:3 | ||
} | ||
class RequestObject { | ||
constructor({method = 'get',url = '',attempts = 1, params={},data = {},alias = null, continueWithFailure = false, onProgress = null, ...rest}={}){ | ||
@@ -152,2 +145,11 @@ this.maxAttempts = attempts < 1 ? 1 : attempts; | ||
} | ||
} | ||
} | ||
RequestObject.prototype.Status = { | ||
waiting:0, | ||
executing:1, | ||
completed:2, | ||
failed:3 | ||
} | ||
export default RequestObject |
26828
9
616