Skip to content

Commit 15ed89a

Browse files
committed
Use https on httpbin.test.k6.io examples
1 parent 3d338e9 commit 15ed89a

File tree

66 files changed

+94
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+94
-94
lines changed

src/data/markdown/docs/02 javascript api/02 k6/check- val- sets- -tags- -.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import http from 'k6/http';
3535
import { check } from 'k6';
3636

3737
export default function () {
38-
const res = http.get('http://httpbin.test.k6.io');
38+
const res = http.get('https://httpbin.test.k6.io');
3939
check(res, {
4040
'response code was 200': (res) => res.status == 200,
4141
});
@@ -53,7 +53,7 @@ import http from 'k6/http';
5353
import { check, fail } from 'k6';
5454

5555
export default function () {
56-
const res = http.get('http://httpbin.test.k6.io');
56+
const res = http.get('https://httpbin.test.k6.io');
5757
const checkOutput = check(
5858
res,
5959
{

src/data/markdown/docs/02 javascript api/09 k6-http/60 CookieJar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function () {
2828
redirects: 0,
2929
});
3030
const jar = http.cookieJar();
31-
const cookies = jar.cookiesForURL('http://httpbin.test.k6.io/');
31+
const cookies = jar.cookiesForURL('https://httpbin.test.k6.io/');
3232
check(res1, {
3333
"has cookie 'my_cookie'": (r) => cookies.my_cookie.length > 0,
3434
'cookie has correct value': (r) => cookies.my_cookie[0] === 'hello world',

src/data/markdown/docs/02 javascript api/09 k6-http/60 CookieJar/CookieJar-cookiesForUrl-url.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function () {
2626
redirects: 0,
2727
});
2828
const jar = http.cookieJar();
29-
const cookies = jar.cookiesForURL('http://httpbin.test.k6.io/');
29+
const cookies = jar.cookiesForURL('https://httpbin.test.k6.io/');
3030
check(res, {
3131
"has cookie 'my_cookie'": (r) => cookies.my_cookie.length > 0,
3232
'cookie has correct value': (r) => cookies.my_cookie[0] === 'hello world',

src/data/markdown/docs/02 javascript api/09 k6-http/60-Params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Here is another example using [http.batch()](/javascript-api/k6-http/batch) with
5151
import http from 'k6/http';
5252

5353
const url1 = 'https://api.k6.io/v3/account/me';
54-
const url2 = 'http://httpbin.test.k6.io/get';
54+
const url2 = 'https://httpbin.test.k6.io/get';
5555
const apiToken = 'f232831bda15dd233c53b9c548732c0197619a3d3c451134d9abded7eb5bb195';
5656
const requestHeaders = {
5757
'User-Agent': 'k6',

src/data/markdown/docs/03 cloud/01 Creating and running a test/999 Troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ For debugging, k6 also provides a few builtin options:
5858
```javascript
5959
import http from 'k6/http';
6060

61-
const res = http.get('http://httpbin.test.k6.io/json');
61+
const res = http.get('https://httpbin.test.k6.io/json');
6262
console.log(JSON.stringify(res));
6363
```
6464

src/data/markdown/docs/05 Examples/01 Examples/02 http-authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function () {
2222

2323
// Passing username and password as part of the URL will
2424
// allow us to authenticate using HTTP Basic Auth.
25-
const url = `http://${credentials}@httpbin.test.k6.io/basic-auth/${username}/${password}`;
25+
const url = `https://${credentials}@httpbin.test.k6.io/basic-auth/${username}/${password}`;
2626

2727
let res = http.get(url);
2828

@@ -42,7 +42,7 @@ export default function () {
4242
},
4343
};
4444

45-
res = http.get(`http://httpbin.test.k6.io/basic-auth/${username}/${password}`, options);
45+
res = http.get(`https://httpbin.test.k6.io/basic-auth/${username}/${password}`, options);
4646

4747
// Verify response (checking the echoed data from the httpbin.test.k6.io
4848
// basic auth test API endpoint)
@@ -72,7 +72,7 @@ export default function () {
7272
// authenticate using HTTP Digest authentication.
7373
const credentials = `${username}:${password}`;
7474
const res = http.get(
75-
`http://${credentials}@httpbin.test.k6.io/digest-auth/auth/${username}/${password}`,
75+
`https://${credentials}@httpbin.test.k6.io/digest-auth/auth/${username}/${password}`,
7676
{ auth: 'digest' }
7777
);
7878

src/data/markdown/docs/05 Examples/01 Examples/08 cookies-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { check, group } from 'k6';
2222

2323
export default function () {
2424
// Since this request redirects the `res.cookies` property won't contain the cookies
25-
const res = http.get('http://httpbin.test.k6.io/cookies/set?name1=value1&name2=value2');
25+
const res = http.get('https://httpbin.test.k6.io/cookies/set?name1=value1&name2=value2');
2626
check(res, {
2727
'status is 200': (r) => r.status === 200,
2828
});

src/data/markdown/docs/05 Examples/01 Examples/23 get-timings-for-an-http-metric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This script gets the request duration timing for a specific GET request and logs
2626
import http from 'k6/http';
2727

2828
export default function () {
29-
const res = http.get('http://httpbin.test.k6.io');
29+
const res = http.get('https://httpbin.test.k6.io');
3030
console.log('Response time was ' + String(res.timings.duration) + ' ms');
3131
}
3232
```

src/data/markdown/translated-guides/en/02 Using k6/04 Thresholds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ export const options = {
475475
};
476476
477477
export default function () {
478-
const res = http.get('http://httpbin.test.k6.io');
478+
const res = http.get('https://httpbin.test.k6.io');
479479
480480
check(res, {
481481
'status is 500': (r) => r.status == 500,
@@ -508,12 +508,12 @@ export const options = {
508508
export default function () {
509509
let res;
510510
511-
res = http.get('http://httpbin.test.k6.io');
511+
res = http.get('https://httpbin.test.k6.io');
512512
check(res, {
513513
'status is 500': (r) => r.status == 500,
514514
});
515515
516-
res = http.get('http://httpbin.test.k6.io');
516+
res = http.get('https://httpbin.test.k6.io');
517517
check(
518518
res,
519519
{

src/data/markdown/translated-guides/en/02 Using k6/08 Tags and Groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const myTrend = new Trend('my_trend');
8080

8181
export default function () {
8282
// Add tag to request metric data
83-
const res = http.get('http://httpbin.test.k6.io/', {
83+
const res = http.get('https://httpbin.test.k6.io/', {
8484
tags: {
8585
my_tag: "I'm a tag",
8686
},

0 commit comments

Comments
 (0)