Created
October 9, 2015 09:31
-
-
Save Deiru2k/694ac68d555dba4b2b0d to your computer and use it in GitHub Desktop.
2Spooky4Me
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
// App Run | |
$API.setHeader(`Content-Type`, `application/json`); | |
// Take One | |
const headers = new Map(); | |
headers[`Content-Type`] = `multipart/form-data`; | |
console.log(headers) | |
// Map{} Content-Type: `multipart/form-data`; | |
$API.post('UploadAvatar', formData, {headers}); | |
// Request Header: Content-Type: application/json; | |
// Take Two | |
const headers = new Map(); | |
headers.set(`Content-Type`, `multipart/form-data`); | |
console.log(headers) | |
// Map{} Content-Type: `multipart/form-data`; | |
$API.post('UploadAvatar', formData, {headers}); | |
//Request Header: Content-Type: application/json; multipart/form-data; WTF??? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment