Skip to content

Android utf8 with Android. #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nativescript-background-http/background-http.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ class Task extends ObservableBase {
}
}

var utf8 = options.utf8;

if (utf8) {
request.setUtf8Charset();
}

var displayNotificationProgress = typeof options.androidDisplayNotificationProgress === "boolean" ? options.androidDisplayNotificationProgress : true;
if (displayNotificationProgress) {
request.setNotificationConfig(new (<any>net).gotev.uploadservice.UploadNotificationConfig());
Expand Down
4 changes: 4 additions & 0 deletions nativescript-background-http/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export interface Request {
*/
description: string;

/**
* Use utf8 encode in requests
*/
utf8?: boolean;

/*
* Use this to set if progress notification should be displayed or not
Expand Down