(options)
| 156 | } |
| 157 | |
| 158 | function get(options) { |
| 159 | if (isQuanX) { |
| 160 | if (typeof options == "string") options = { url: options, method: "GET" }; |
| 161 | return $task.fetch(options); |
| 162 | } else { |
| 163 | return new Promise((resolve, reject) => { |
| 164 | $httpClient.get(options, (err, response, body) => { |
| 165 | if (err) reject(err); |
| 166 | else resolve({ statusCode: response.status, headers: response.headers, body }); |
| 167 | }); |
| 168 | }); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | function read(key) { |
| 173 | if (typeof $notify != "undefined") { |