Skip to content

Instantly share code, notes, and snippets.

@vanthao03596
Created October 25, 2021 02:24
Show Gist options
  • Save vanthao03596/fa954c5ba1f9bf90b67c3d02a85d8c5d to your computer and use it in GitHub Desktop.
Save vanthao03596/fa954c5ba1f9bf90b67c3d02a85d8c5d to your computer and use it in GitHub Desktop.
const qs = `itemid=${id}&shopid=${shopId}`;
const qsHash = crypto.createHash('md5').update(qs).digest('hex');
const none = crypto.createHash('md5').update(`55b03${qsHash}55b03`).digest('hex');
const data = await axios.get(`https://shopee.vn/api/v2/item/get?${qs}`, {
headers: { 'if-none-match-': `55b03-${none}` },
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment