Skip to content

Instantly share code, notes, and snippets.

@ddikman
Created January 18, 2022 07:45
Show Gist options
  • Save ddikman/6db5b344026ca0a3c12f281f42875310 to your computer and use it in GitHub Desktop.
Save ddikman/6db5b344026ca0a3c12f281f42875310 to your computer and use it in GitHub Desktop.
NodeJS在庫連携例
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