Skip to content

Commit 05a8272

Browse files
committed
using mockbin.com
1 parent 3653442 commit 05a8272

13 files changed

Lines changed: 36 additions & 36 deletions

File tree

‎test/fixtures/full.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"method": "POST",
3-
"url": "http://httpconsole.com/debug",
3+
"url": "http://mockbin.com/request",
44
"httpVersion": "HTTP/1.1",
55
"queryString": [
66
{ "name": "foo", "value": "bar" },
@@ -13,8 +13,8 @@
1313
{ "name": "X-Pretty-Print", "value": "2" }
1414
],
1515
"cookies": [
16-
{ "name": "foo", "value": "bar", "path": "/", "domain": "www.httpconsole.com", "expires": "2015-02-11T04:28:14.821Z", "httpOnly": false, "secure": false },
17-
{ "name": "bar", "value": "baz", "path": "/", "domain": "www.httpconsole.com", "expires": "2015-02-11T04:28:14.821Z", "httpOnly": false, "secure": false }
16+
{ "name": "foo", "value": "bar", "path": "/", "domain": "www.mockbin.com", "expires": "2015-02-11T04:28:14.821Z", "httpOnly": false, "secure": false },
17+
{ "name": "bar", "value": "baz", "path": "/", "domain": "www.mockbin.com", "expires": "2015-02-11T04:28:14.821Z", "httpOnly": false, "secure": false }
1818
],
1919
"headersSize": 44,
2020
"bodySize": 14,

‎test/fixtures/http1.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"method": "GET",
3-
"url": "http://httpconsole.com/debug",
3+
"url": "http://mockbin.com/request",
44
"httpVersion": "HTTP/1.0"
55
}

‎test/fixtures/invalid.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"method": "POST",
3-
"url": "http://httpconsole.com/debug",
3+
"url": "http://mockbin.com/request",
44
"httpVersion": "HTTP/1.1",
55
"queryString": [],
66
"cookies": [],

‎test/fixtures/query.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"method": "POST",
3-
"url": "http://httpconsole.com/debug?key=value",
3+
"url": "http://mockbin.com/request?key=value",
44
"httpVersion": "HTTP/1.1",
55
"queryString": [
66
{ "name": "foo", "value": "bar" },

‎test/fixtures/short.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"method": "GET",
3-
"url": "http://httpconsole.com/echo"
3+
"url": "http://mockbin.com/echo"
44
}

‎test/fixtures/simple.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"method": "POST",
3-
"url": "http://httpconsole.com/debug",
3+
"url": "http://mockbin.com/request",
44
"httpVersion": "HTTP/1.1",
55
"queryString": [
66
{ "name": "foo", "value": "bar" }

‎test/index.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ describe('HTTPSnippet', function () {
2121
req.uriObj.should.eql({
2222
auth: null,
2323
hash: null,
24-
host: 'httpconsole.com',
25-
hostname: 'httpconsole.com',
26-
href: 'http://httpconsole.com/debug',
27-
path: '/debug?foo=bar',
28-
pathname: '/debug',
24+
host: 'mockbin.com',
25+
hostname: 'mockbin.com',
26+
href: 'http://mockbin.com/request',
27+
path: '/request?foo=bar',
28+
pathname: '/request',
2929
port: null,
3030
protocol: 'http:',
3131
query: {
@@ -64,7 +64,7 @@ describe('HTTPSnippet', function () {
6464
var req = new HTTPSnippet(fixtures.query).getSource();
6565

6666
req.url.should.be.a.String;
67-
req.url.should.eql('http://httpconsole.com/debug');
67+
req.url.should.eql('http://mockbin.com/request');
6868

6969
done();
7070
});
@@ -73,7 +73,7 @@ describe('HTTPSnippet', function () {
7373
var req = new HTTPSnippet(fixtures.query).getSource();
7474

7575
req.fullUrl.should.be.a.String;
76-
req.fullUrl.should.eql('http://httpconsole.com/debug?key=value&baz=abc&foo=bar&foo=baz');
76+
req.fullUrl.should.eql('http://mockbin.com/request?key=value&baz=abc&foo=bar&foo=baz');
7777

7878
done();
7979
});
@@ -82,7 +82,7 @@ describe('HTTPSnippet', function () {
8282
var req = new HTTPSnippet(fixtures.query).getSource();
8383

8484
req.uriObj.path.should.be.a.String;
85-
req.uriObj.path.should.eql('/debug?key=value&baz=abc&foo=bar&foo=baz');
85+
req.uriObj.path.should.eql('/request?key=value&baz=abc&foo=bar&foo=baz');
8686

8787
done();
8888
});

‎test/targets/curl.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('cURL', function () {
1111
});
1212

1313
result.should.be.a.String;
14-
result.should.eql('curl --request POST --url "http://httpconsole.com/debug?foo=bar" --header "Content-Type: application/json" --cookie "bar=baz" --form "{\\"foo\\": \\"bar\\"}"');
14+
result.should.eql('curl --request POST --url "http://mockbin.com/request?foo=bar" --header "Content-Type: application/json" --cookie "bar=baz" --form "{\\"foo\\": \\"bar\\"}"');
1515

1616
done();
1717
});
@@ -23,7 +23,7 @@ describe('cURL', function () {
2323
});
2424

2525
result.should.be.a.String;
26-
result.should.eql('curl -X POST "http://httpconsole.com/debug?foo=bar" -H "Content-Type: application/json" -b "bar=baz" -F "{\\"foo\\": \\"bar\\"}"');
26+
result.should.eql('curl -X POST "http://mockbin.com/request?foo=bar" -H "Content-Type: application/json" -b "bar=baz" -F "{\\"foo\\": \\"bar\\"}"');
2727

2828
done();
2929
});
@@ -34,7 +34,7 @@ describe('cURL', function () {
3434
});
3535

3636
result.should.be.a.String;
37-
result.should.eql('curl --request GET --url "http://httpconsole.com/debug" --http1.0');
37+
result.should.eql('curl --request GET --url "http://mockbin.com/request" --http1.0');
3838

3939
done();
4040
});
@@ -45,7 +45,7 @@ describe('cURL', function () {
4545
});
4646

4747
result.should.be.a.String;
48-
result.replace(/\\\n/g, '').should.eql('curl --request POST @--url "http://httpconsole.com/debug?foo=bar" @--header "Content-Type: application/json" @--cookie "bar=baz" @--form "{\\"foo\\": \\"bar\\"}"');
48+
result.replace(/\\\n/g, '').should.eql('curl --request POST @--url "http://mockbin.com/request?foo=bar" @--header "Content-Type: application/json" @--cookie "bar=baz" @--form "{\\"foo\\": \\"bar\\"}"');
4949

5050
done();
5151
});

‎test/targets/httpie.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('HTTPie', function () {
1111
});
1212

1313
result.should.be.a.String;
14-
result.should.eql('echo "{\\"foo\\": \\"bar\\"}" | http POST http://httpconsole.com/debug?foo=bar Content-Type:application/json Cookie:bar=baz');
14+
result.should.eql('echo "{\\"foo\\": \\"bar\\"}" | http POST http://mockbin.com/request?foo=bar Content-Type:application/json Cookie:bar=baz');
1515

1616
done();
1717
});
@@ -23,7 +23,7 @@ describe('HTTPie', function () {
2323
});
2424

2525
result.should.be.a.String;
26-
result.should.eql('echo "{\\"foo\\": \\"bar\\"}" | http --verbose POST http://httpconsole.com/debug?foo=bar Content-Type:application/json Cookie:bar=baz');
26+
result.should.eql('echo "{\\"foo\\": \\"bar\\"}" | http --verbose POST http://mockbin.com/request?foo=bar Content-Type:application/json Cookie:bar=baz');
2727

2828
done();
2929
});
@@ -36,7 +36,7 @@ describe('HTTPie', function () {
3636
});
3737

3838
result.should.be.a.String;
39-
result.should.eql('http --verbose --cert=foo GET http://httpconsole.com/echo');
39+
result.should.eql('http --verbose --cert=foo GET http://mockbin.com/echo');
4040

4141
done();
4242
});
@@ -47,7 +47,7 @@ describe('HTTPie', function () {
4747
});
4848

4949
result.should.be.a.String;
50-
result.replace(/\\\n/g, '').should.eql('echo "{\\"foo\\": \\"bar\\"}" | @http POST http://httpconsole.com/debug?foo=bar @Content-Type:application/json @Cookie:bar=baz');
50+
result.replace(/\\\n/g, '').should.eql('echo "{\\"foo\\": \\"bar\\"}" | @http POST http://mockbin.com/request?foo=bar @Content-Type:application/json @Cookie:bar=baz');
5151

5252
done();
5353
});
@@ -59,7 +59,7 @@ describe('HTTPie', function () {
5959
});
6060

6161
result.should.be.a.String;
62-
result.replace(/\\\n/g, '').should.eql('http POST http://httpconsole.com/debug key==value baz==abc foo==bar foo==baz');
62+
result.replace(/\\\n/g, '').should.eql('http POST http://mockbin.com/request key==value baz==abc foo==bar foo==baz');
6363

6464
done();
6565
});

‎test/targets/node/native.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Node.js', function () {
1010
indent: '\t'
1111
});
1212

13-
result.replace(/\n/g, '').should.eql('var http = require("http");var options = {\t"method": "POST",\t"hostname": "httpconsole.com",\t"port": null,\t"path": "/debug?baz=abc&foo=bar&foo=baz",\t"headers": {\t\t"Accept": "text/plain",\t\t"Content-Type": "application/json",\t\t"X-Pretty-Print": "2",\t\t"Cookie": "foo=bar; bar=baz"\t}};var req = http.request(options, function (res) {\tvar chunks = [];\tres.on("data", function (chunk) {\t\tchunks.push(chunk);\t});\tres.on("end", function () {\t\tvar body = Buffer.concat(chunks);\t});});req.write("{\\"foo\\": \\"bar\\"}")req.end();');
13+
result.replace(/\n/g, '').should.eql('var http = require("http");var options = {\t"method": "POST",\t"hostname": "mockbin.com",\t"port": null,\t"path": "/request?baz=abc&foo=bar&foo=baz",\t"headers": {\t\t"Accept": "text/plain",\t\t"Content-Type": "application/json",\t\t"X-Pretty-Print": "2",\t\t"Cookie": "foo=bar; bar=baz"\t}};var req = http.request(options, function (res) {\tvar chunks = [];\tres.on("data", function (chunk) {\t\tchunks.push(chunk);\t});\tres.on("end", function () {\t\tvar body = Buffer.concat(chunks);\t});});req.write("{\\"foo\\": \\"bar\\"}")req.end();');
1414

1515
done();
1616
});

0 commit comments

Comments
 (0)