Skip to content

Instantly share code, notes, and snippets.

@novonimo
Created July 5, 2020 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save novonimo/f72c626bbe892e550489170fe5ae2a66 to your computer and use it in GitHub Desktop.
Save novonimo/f72c626bbe892e550489170fe5ae2a66 to your computer and use it in GitHub Desktop.
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