Commit 1b07ad45 by wkliang

test curl

parent 77f84027
...@@ -94,17 +94,17 @@ class RestClient { ...@@ -94,17 +94,17 @@ class RestClient {
} }
async execGet (subData, url) { async execGet (subData, url) {
console.log(settings.env) console.log(settings.env)
if (settings.env == 'dev') { // if (settings.env == 'dev') {
try { // try {
const rs = await axios.get(url); // const rs = await axios.get(url);
const ret = { // const ret = {
stdout: JSON.stringify(rs.data) // stdout: JSON.stringify(rs.data)
} // }
return ret; // return ret;
} catch (error) { // } catch (error) {
return error.response // return error.response
} // }
} // }
try { try {
let cmd = this.FetchGetCmd(subData, url); let cmd = this.FetchGetCmd(subData, url);
var result = await this.exec(cmd); var result = await this.exec(cmd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment