Skip to content

Commit a6744ee

Browse files
authored
Merge pull request #82 from WPO-Foundation/jefflembeck-patch-1
fix(api): change curl command in docs
2 parents ab7d545 + e6e5afd commit a6744ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/api/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ To make sure your API key is ready to go, let's get your first test submitted. I
2121
Copy and paste the following command into your terminal, inserting your api key in place of the placeholders:
2222

2323
```bash
24-
curl https://www.webpagetest.org/runtest.php?url=https://www.webpagetest.org&k={YOUR_API_KEY}&f=json
24+
curl --request POST --url 'https://www.webpagetest.org/runtest.php?&url=https%3A%2F%2Fwww.webpagetest.org&f=json' --header 'X-WPT-API-KEY: {YOUR_API_KEY}'
2525
```
2626

2727
The request above will:
2828

2929
- Submit a test for www.webpagetest.org (using the `url` parameter)
30-
- Authenticate using your API key (using the `k` parameter)
3130
- Request a JSON response (using the `f` parameter)
31+
- Authenticate using your API key (using the `X-WPT-API-KEY` header)
3232

3333
If all goes well, you should get a JSON response, similar to the one below, telling you the test has been successfully submitted (`statusCode`=200), and providing you with the `testId` as well as several links for digging into results once the test has been completed.
3434

0 commit comments

Comments
 (0)