Created
January 18, 2022 07:45
-
-
Save ddikman/6db5b344026ca0a3c12f281f42875310 to your computer and use it in GitHub Desktop.
NodeJS在庫連携例
This file contains 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
const req = require('request'); | |
const fs = require('fs'); | |
req.post({ | |
headers: { | |
'Content-Type': 'multipart/form-data', | |
'X-Api-Key': 'MY_KEY' | |
}, | |
url: 'https://api.facy.jp/integration/inventory', | |
method: 'POST', | |
formData: { | |
file: fs.createReadStream(__dirname + '/MY_CSV_FILE.csv') | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment