Created
March 29, 2021 07:18
-
-
Save siteslave/928ff0a0a0f45a266ddd7d06754042fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search(cid: any, token: any) { | |
var options = { | |
method: 'GET', | |
url: 'http://203.157.103.178/api/v1/search/' + cid, | |
headers: { | |
Authorization: 'Bearer ' + token | |
} | |
}; | |
return new Promise((resolve: any, reject: any) => { | |
axios.request(options).then(function (response: any) { | |
resolve(response.data); | |
}).catch(function (error: any) { | |
reject(error); | |
}); | |
}); | |
} | |
// เวลาเรียก | |
var res: any = await search("xxxxx", "exxxxxx.xxxx.xxx"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment