Created
June 9, 2020 11:16
-
-
Save nxvhm/e5923c5c4dba0fa67b91322dd2fdbeaf to your computer and use it in GitHub Desktop.
Revisions
-
nxvhm created this gist
Jun 9, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ fetch('http://mydomain.local/api/photo', { method: 'POST', mode: 'cors', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({'lat': 12121, lng: 1212121, title: 'dasdasdsa', 'image': 'data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg=='}) }).then(res => { console.log('res', res); }).catch(err => { console.log('err', err); })