Skip to content

Commit c85ac8d

Browse files
author
radeva
authored
Merge pull request #79 from Ablankzin/android-utf8
(feat): Use utf8 with Android.
2 parents 0e4f5f2 + fd29ed7 commit c85ac8d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

nativescript-background-http/background-http.android.ts

+6
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ class Task extends ObservableBase {
186186
}
187187
}
188188

189+
var utf8 = options.utf8;
190+
191+
if (utf8) {
192+
request.setUtf8Charset();
193+
}
194+
189195
var displayNotificationProgress = typeof options.androidDisplayNotificationProgress === "boolean" ? options.androidDisplayNotificationProgress : true;
190196
if (displayNotificationProgress) {
191197
request.setNotificationConfig(new (<any>net).gotev.uploadservice.UploadNotificationConfig());

nativescript-background-http/index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ export interface Request {
149149
*/
150150
description: string;
151151

152+
/**
153+
* Use utf8 encode in requests
154+
*/
155+
utf8?: boolean;
152156

153157
/*
154158
* Use this to set if progress notification should be displayed or not

0 commit comments

Comments
 (0)