diff --git a/debugging/timeline.mdx b/debugging/timeline.mdx index d296f7b5..da2fec86 100644 --- a/debugging/timeline.mdx +++ b/debugging/timeline.mdx @@ -1,10 +1,11 @@ --- title: "Timeline" +description: "Inspect the main request, script-triggered HTTP calls, and console output in one chronological view." --- -The **Timeline** tab provides comprehensive insights into your API requests and responses. It displays detailed information about what was sent, what was received, and network-level details to help you debug and validate your API calls effectively. +**Timeline** tab shows everything that happened during a request run. It includes the main HTTP call, any extra requests made from scripts, and the resolved request details for each step. -## Timeline Structure +## Timeline Interface The Timeline tab is organized into three categories: @@ -12,8 +13,7 @@ The Timeline tab is organized into three categories: 2. **Response** 3. **Network Logs** -![Response Timeline](/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp) - +![Response Timeline](/images/screenshots/send-request/res-data-and-cookie/01-timeline.webp) ### 1. Request Tab The Request tab displays everything that was sent with your API request: @@ -45,3 +45,21 @@ The Network Logs tab provides low-level network insights for advanced debugging: * **Debugging Information** - Additional network-level diagnostics This comprehensive view helps you identify performance bottlenecks, debug connection issues, and understand the complete lifecycle of your API requests. + +## Script Logs in Timeline + +When scripts use [`bru.sendRequest()`](/testing/script/javascript-reference#brusendrequestoptions-callback) or [`bru.runRequest()`](/testing/script/javascript-reference#brurunrequestrequestpathname), Timeline lists every HTTP call made during the run. Use the filter tabs to narrow the view. + +![Script Logs in Timeline](/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp) + +The number on each tab is how many requests match that filter. + +| Tab | What it shows | +| --- | --- | +| **All** | Every HTTP request from the run including the main request plus any calls made from scripts (with or without `sendRequest` / `runRequest`). | +| **Request** | Only the **main request** — the HTTP call defined in the request URL bar (method, URL, body, and headers you configured in Bruno). | +| **Pre-Request** | Only HTTP requests executed during the **pre-request script** phase (from `bru.sendRequest()` or `bru.runRequest()` before the main request is sent). | +| **Post-Response** | Only HTTP requests executed during the **post-response** or **test** script phase (from `bru.sendRequest()` or `bru.runRequest()` after the main response returns). | + +Click a row to expand it and inspect that call's request body, headers, response, and network timing. Use **Clear Timeline** to reset the list before the next run. + diff --git a/images/screenshots/send-request/res-data-and-cookie/01-timeline.webp b/images/screenshots/send-request/res-data-and-cookie/01-timeline.webp new file mode 100644 index 00000000..08a0cd75 Binary files /dev/null and b/images/screenshots/send-request/res-data-and-cookie/01-timeline.webp differ diff --git a/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp b/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp index 4bfa5c09..553e4735 100644 Binary files a/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp and b/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp differ diff --git a/send-requests/res-data-cookies/res-data.mdx b/send-requests/res-data-cookies/res-data.mdx index cf60c136..245ae088 100644 --- a/send-requests/res-data-cookies/res-data.mdx +++ b/send-requests/res-data-cookies/res-data.mdx @@ -24,7 +24,7 @@ The request headers are displayed to show what was sent to the API. This can hel ### Timeline -The response timeline displays the response headers sent along with the request body, including details such as content-type, date, cache, and connection status. +The **Timeline** tab lists every HTTP call from a request run along with the main request plus any calls made by scripts. See [Timeline](/debugging/timeline) for context badges (`main`, `sendRequest`, `runRequest`), filter tabs, and per-request details. ![Response Timeline](/images/screenshots/send-request/res-data-and-cookie/res-timeline.webp) diff --git a/testing/script/javascript-reference.mdx b/testing/script/javascript-reference.mdx index 7d915567..38f56abd 100644 --- a/testing/script/javascript-reference.mdx +++ b/testing/script/javascript-reference.mdx @@ -1453,7 +1453,7 @@ Send a programmatic HTTP request from your script. Supports `method`, `url`, `he - You can see the executed request using `sendRequest` in the [timeline tab](/send-requests/res-data-cookies/res-data#timeline) with `sendRequest` tag attached to it. + You can see the executed request in the [Timeline](/debugging/timeline) tab with a `sendRequest` context badge. ```javascript @@ -1598,7 +1598,7 @@ Executes another request in the collection by its name and returns its response. - You can see the executed request using `runRequest` in the [timeline tab](/send-requests/res-data-cookies/res-data#timeline) with `runRequest` tag attached to it. + You can see the executed request in the [Timeline](/debugging/timeline) tab with a `runRequest` context badge. ```javascript