mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Formatting
This commit is contained in:
@@ -329,7 +329,8 @@ export var test_request_headersSentAndReceivedProperly = function (done) {
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
http.request({
|
http.request({
|
||||||
url: "https://httpbin.org/get", method: "GET",
|
url: "https://httpbin.org/get",
|
||||||
|
method: "GET",
|
||||||
headers: { "Content-Type": "application/json" }
|
headers: { "Content-Type": "application/json" }
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
result = response.headers;
|
result = response.headers;
|
||||||
@@ -349,7 +350,8 @@ export var test_request_contentSentAndReceivedProperly = function (done) {
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
http.request({
|
http.request({
|
||||||
url: "https://httpbin.org/post", method: "POST",
|
url: "https://httpbin.org/post",
|
||||||
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||||
content: "MyVariableOne=ValueOne&MyVariableTwo=ValueTwo"
|
content: "MyVariableOne=ValueOne&MyVariableTwo=ValueTwo"
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
@@ -372,7 +374,8 @@ export var test_request_NonStringHeadersSentAndReceivedProperly = function (done
|
|||||||
var postData = "MyVariableOne=ValueOne&MyVariableTwo=ValueTwo";
|
var postData = "MyVariableOne=ValueOne&MyVariableTwo=ValueTwo";
|
||||||
|
|
||||||
http.request({
|
http.request({
|
||||||
url: "https://httpbin.org/post", method: "POST",
|
url: "https://httpbin.org/post",
|
||||||
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/x-www-form-urlencoded", "Content-Length": postData.length },
|
headers: { "Content-Type": "application/x-www-form-urlencoded", "Content-Length": postData.length },
|
||||||
content: postData
|
content: postData
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
@@ -396,7 +399,8 @@ export var test_request_jsonAsContentSentAndReceivedProperly = function (done) {
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
http.request({
|
http.request({
|
||||||
url: "https://httpbin.org/post", method: "POST",
|
url: "https://httpbin.org/post",
|
||||||
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
content: JSON.stringify({ MyVariableOne: "ValueOne", MyVariableTwo: "ValueTwo" })
|
content: JSON.stringify({ MyVariableOne: "ValueOne", MyVariableTwo: "ValueTwo" })
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
|
|||||||
Reference in New Issue
Block a user