diff --git a/.gitignore b/.gitignore index 5c1632f..3fb9940 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .vscode .idea .DS_Store +*.history *.esm.json *.js *.js.map diff --git a/demo/app/assets/httpbin.org.cer b/demo/app/assets/httpbin.org.cer index b2b0c26..8ba123f 100644 Binary files a/demo/app/assets/httpbin.org.cer and b/demo/app/assets/httpbin.org.cer differ diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts index 3944f11..0f26010 100644 --- a/demo/app/main-page.ts +++ b/demo/app/main-page.ts @@ -42,6 +42,23 @@ export function postHttpbin() { postRequest('https://httpbin.org/post', {"foo": "bar", "baz": undefined, "plaz": null}); } +export function postHttpbinWithUTF8() { + Https.request( + { + url: 'https://httpbin.org/post', + method: 'POST', + body: {"foo": "bar", "baz": undefined, "plaz": null}, + headers: { + 'Content-Type': "application/json; charset=utf-8" + } + }) + .then(response => console.log('Https.request response', response)) + .catch(error => { + console.error('Https.request error', error); + dialogs.alert(error); + }); + } + export function getHttpbin() { getRequest('https://httpbin.org/get'); } diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 7ccb009..25c7df0 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -9,6 +9,7 @@