Formatting

This commit is contained in:
vakrilov
2015-05-19 16:46:17 +03:00
parent 52f6dd00da
commit 86511af5e7

View File

@@ -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) {