Skip to content

Commit 7783ed1

Browse files
committed
add callouts for url redirects
1 parent baf1a2c commit 7783ed1

File tree

8 files changed

+40
-0
lines changed

8 files changed

+40
-0
lines changed

src/content/cre/guides/workflow/using-http-client/get-request-go.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ All HTTP requests are wrapped in a consensus mechanism to provide a single, reli
2323

2424
This guide assumes you have a basic understanding of CRE. If you are new, we strongly recommend completing the [Getting Started tutorial](/cre/getting-started/overview) first.
2525

26+
{/* prettier-ignore */}
27+
<Aside type="caution" title="Redirects are not supported">
28+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
29+
</Aside>
30+
2631
## Choosing your approach
2732

2833
### Use `http.SendRequest` (Section 1) when:

src/content/cre/guides/workflow/using-http-client/get-request-ts.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ All HTTP requests are wrapped in a consensus mechanism to provide a single, reli
2323

2424
This guide assumes you have a basic understanding of CRE. If you are new, we strongly recommend completing the [Getting Started tutorial](/cre/getting-started/overview) first.
2525

26+
{/* prettier-ignore */}
27+
<Aside type="caution" title="Redirects are not supported">
28+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
29+
</Aside>
30+
2631
## Choosing your approach
2732

2833
### Use `sendRequest` (Section 1) when:

src/content/cre/guides/workflow/using-http-client/post-request-go.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ For this example, we will use <a href="https://webhook.site/" target="_blank">**
5252

5353
This guide assumes you have a basic understanding of CRE. If you are new, we strongly recommend completing the [Getting Started tutorial](/cre/getting-started/overview) first.
5454

55+
{/* prettier-ignore */}
56+
<Aside type="caution" title="Redirects are not supported">
57+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
58+
</Aside>
59+
5560
## 1. The `http.SendRequest` Pattern (recommended)
5661

5762
The `http.SendRequest` helper function is the simplest and recommended way to make `POST` requests. It automatically handles the `cre.RunInNodeMode` pattern for you.

src/content/cre/guides/workflow/using-http-client/post-request-ts.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ For this example, we will use <a href="https://webhook.site/" target="_blank">**
5252

5353
This guide assumes you have a basic understanding of CRE. If you are new, we strongly recommend completing the [Getting Started tutorial](/cre/getting-started/overview) first.
5454

55+
{/* prettier-ignore */}
56+
<Aside type="caution" title="Redirects are not supported">
57+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
58+
</Aside>
59+
5560
## 1. The High-Level `sendRequest` Pattern (recommended)
5661

5762
The high-level `sendRequest()` method is the simplest and recommended way to make `POST` requests. It automatically handles the `runInNodeMode` pattern for you.

src/content/cre/guides/workflow/using-http-client/submitting-reports-http-go.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ This guide shows how to send a cryptographically signed report (generated by you
3131
- Understanding of [generating reports](/cre/guides/workflow/using-evm-client/onchain-write/generating-reports-single-values)
3232
- A generated report from `runtime.GenerateReport()`
3333

34+
{/* prettier-ignore */}
35+
<Aside type="caution" title="Redirects are not supported">
36+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
37+
</Aside>
38+
3439
## Quick start: Minimal example
3540

3641
Here's the simplest possible workflow that generates and submits a report via HTTP:

src/content/cre/guides/workflow/using-http-client/submitting-reports-http-ts.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ This guide shows how to send a cryptographically signed report (generated by you
3030
- Familiarity with [making POST requests](/cre/guides/workflow/using-http-client/post-request)
3131
- Familiarity with `runtime.report()` (covered [below](#generating-reports-for-http-submission))
3232

33+
{/* prettier-ignore */}
34+
<Aside type="caution" title="Redirects are not supported">
35+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
36+
</Aside>
37+
3338
## Quick start: Minimal example
3439

3540
Here's the simplest possible workflow that generates and submits a report via HTTP:

src/content/cre/reference/sdk/http-client-go.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ The HTTP Client lets you make requests to external APIs from your workflow. Each
3535

3636
Defines the parameters for an outgoing HTTP request.
3737

38+
{/* prettier-ignore */}
39+
<Aside type="caution" title="Redirects are not supported">
40+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
41+
</Aside>
42+
3843
| <div style="width: 120px;">Field</div> | <div style="width: 200px;">Type</div> | Description |
3944
| -------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
4045
| `Url` | `string` | The URL of the API endpoint. |

src/content/cre/reference/sdk/http-client-ts.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ const fetchPrice = (sendRequester: HTTPSendRequester, url: string): number => {
389389

390390
Defines the parameters for an outgoing HTTP request.
391391

392+
{/* prettier-ignore */}
393+
<Aside type="caution" title="Redirects are not supported">
394+
HTTP requests to URLs that return redirects (3xx status codes) will fail. Ensure the URL you provide is the final destination and does not redirect to another URL.
395+
</Aside>
396+
392397
| Field | Type | Description |
393398
| --------------- | ------------------------------------------------- | --------------------------------------------------------------- |
394399
| `url` | `string` | The URL of the API endpoint. |

0 commit comments

Comments
 (0)