Created
July 5, 2020 08:15
-
-
Save novonimo/f72c626bbe892e550489170fe5ae2a66 to your computer and use it in GitHub Desktop.
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
import service from "./service.json"; | |
function sendAvailableArea() { | |
const headers = { | |
'x-api-key': process.env.REACT_APP_MAP_IR_ACCESS_TOKEN, | |
// 'Content-Type': 'multipart/form-data' | |
}; | |
const formData = new FormData(); | |
// | |
formData.append("polygons", new Blob([service], {type: "application/json"})); | |
// formData.append("polygons", service); | |
axios.post('https://map.ir/geofence/stages', formData, {headers: headers} | |
).then(console.log).catch(console.log) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment