Skip to content

Commit

Permalink
removed all toString() in favor of JSON.stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
dpnishant authored Feb 5, 2018
1 parent dc25baf commit 6ca5db9
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions scripts/Android/WebView/WebView.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "URL";
data.value = url.toString();
data.value = url;
data.argSeq = 0;
send_data.artifact.push(data);
send(JSON.stringify(send_data));
Expand All @@ -81,14 +81,14 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "URL";
data.value = url.toString();
data.value = url;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Additional Headers";
data.value = additionalHttpHeaders.toString();
data.value = additionalHttpHeaders;
data.argSeq = 0;
send_data.artifact.push(data);
send(JSON.stringify(send_data));
Expand All @@ -115,21 +115,21 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Data";
data.value = data.toString();
data.value = data;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "MIME Type";
data.value = mimeType.toString();
data.value = mimeType;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Encoding";
data.value = encoding.toString();
data.value = encoding;
data.argSeq = 0;
send_data.artifact.push(data);
send(JSON.stringify(send_data));
Expand Down Expand Up @@ -159,35 +159,35 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Base URL";
data.value = data.toString();
data.value = data;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Data";
data.value = data.toString();
data.value = data;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "MIME Type";
data.value = mimeType.toString();
data.value = mimeType;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Encoding";
data.value = encoding.toString();
data.value = encoding;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "History URL";
data.value = historyUrl.toString();
data.value = historyUrl;
data.argSeq = 0;
send_data.artifact.push(data);

Expand All @@ -213,14 +213,14 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Object";
data.value = object.toString();
data.value = object;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Name";
data.value = name.toString();
data.value = name;
data.argSeq = 0;
send_data.artifact.push(data);
send(JSON.stringify(send_data));
Expand All @@ -245,7 +245,7 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Script";
data.value = script.toString();
data.value = script;
data.argSeq = 0;
send_data.artifact.push(data);

Expand All @@ -272,14 +272,14 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "URL";
data.value = url.toString();
data.value = url;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "POST Data";
data.value = postData.toString();
data.value = JSON.stringify(postData);
data.argSeq = 0;
send_data.artifact.push(data);

Expand All @@ -305,14 +305,14 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Message";
data.value = message.getData().toString();
data.value = JSON.stringify(message.getData());
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Target Origin";
data.value = targetOrigin.toString();
data.value = targetOrigin;
data.argSeq = 0;
send_data.artifact.push(data);

Expand All @@ -339,21 +339,21 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Host";
data.value = host.toString();
data.value = host;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Username";
data.value = username.toString();
data.value = username;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Password";
data.value = password.toString();
data.value = password;
data.argSeq = 0;
send_data.artifact.push(data);

Expand Down Expand Up @@ -381,28 +381,28 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Host";
data.value = host.toString();
data.value = host;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Realm";
data.value = realm.toString();
data.value = realm;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Username";
data.value = username.toString();
data.value = username;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Password";
data.value = password.toString();
data.value = password;
data.argSeq = 0;
send_data.artifact.push(data);

Expand Down Expand Up @@ -430,26 +430,26 @@ Java.perform(function() {
/* --- Payload Body --- */
var data = {};
data.name = "Host";
data.value = host.toString();
data.value = host;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Realm";
data.value = realm.toString();
data.value = realm;
data.argSeq = 0;
send_data.artifact.push(data);

/* --- Payload Body --- */
var data = {};
data.name = "Credentials";
data.value = credentials.toString();
data.value = credentials;
data.argSeq = 0;
send_data.artifact.push(data);

send(JSON.stringify(send_data));
return credentials;
}
}
});
});

0 comments on commit 6ca5db9

Please sign in to comment.