Commit 1b07ad45 by wkliang

test curl

parent 77f84027
......@@ -94,17 +94,17 @@ class RestClient {
}
async execGet (subData, url) {
console.log(settings.env)
if (settings.env == 'dev') {
try {
const rs = await axios.get(url);
const ret = {
stdout: JSON.stringify(rs.data)
}
return ret;
} catch (error) {
return error.response
}
}
// if (settings.env == 'dev') {
// try {
// const rs = await axios.get(url);
// const ret = {
// stdout: JSON.stringify(rs.data)
// }
// return ret;
// } catch (error) {
// return error.response
// }
// }
try {
let cmd = this.FetchGetCmd(subData, url);
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