generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* align to Function SDK updates * dictionary and link updates * more updates * Update sdk/inference.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update sdk/inference.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * remove Schema note from Manifest * Update deploy.mdx * Update sdk/functions-sdk.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update sdk/connection.mdx * Update sdk/connection.mdx * Update sdk/connection.mdx * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update sdk/functions-sdk.mdx * formatting * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update connection.mdx * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * Update connection.mdx * Update sdk/connection.mdx Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com> * separate response types * edits * Update http.mdx * URL config --------- Co-authored-by: Matt Johnson-Pint <mattjohnsonpint@gmail.com>
- Loading branch information
1 parent
0c1a7d4
commit b13463c
Showing
9 changed files
with
241 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"MD013": false, | ||
"MD033": false | ||
"MD033": false, | ||
"MD034": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: HTTP | ||
description: "" | ||
--- | ||
|
||
The HTTP API allows you to securely call and fetch data from an HTTP endpoint. | ||
|
||
<Tip> | ||
We're introducing new APIs consistently through ongoing development with build | ||
partners. [Let's chat](mailto:help@hypermode.com) about what would make the | ||
Functions SDK even more powerful for your next use case! | ||
</Tip> | ||
|
||
### fetch | ||
|
||
Invoke an HTTP endpoint to retrieve data or trigger external action. | ||
|
||
```TypeScript | ||
fetch ( | ||
request: Request, | ||
): Response | ||
``` | ||
|
||
<ResponseField name="request" type="Request" required> | ||
A [Request](#request-object) object for calling an HTTP endpoint. | ||
</ResponseField> | ||
|
||
<ResponseField name="response" type="Response"> | ||
A [Response](#response-object) object from the HTTP endpoint. | ||
</ResponseField> | ||
|
||
### Request object | ||
|
||
<ResponseField name="url" type="string"> | ||
The URL to send the request to. You must have a corresponding | ||
[Host](/define-hosts) in your project's manifest. | ||
|
||
Example: https://example.com/whatever | ||
|
||
</ResponseField> | ||
<ResponseField name="method" type="string"> | ||
The HTTP method to use for the request. | ||
|
||
Example: "GET" | ||
|
||
</ResponseField> | ||
<ResponseField name="headers" type="Headers"> | ||
The HTTP headers for the request, as [defined in your | ||
manifest](../define-hosts). | ||
</ResponseField> | ||
<ResponseField name="body" type="ArrayBuffer"> | ||
The raw HTTP request body, as an `ArrayBuffer`. | ||
</ResponseField> | ||
|
||
### Response object | ||
|
||
<ResponseField name="status" type="u16"> | ||
The HTTP response status code. Example: 200 | ||
</ResponseField> | ||
<ResponseField name="statusText" type="string"> | ||
The HTTP response status text. Example: "OK" | ||
</ResponseField> | ||
<ResponseField name="headers" type="Headers"> | ||
The HTTP response headers. | ||
</ResponseField> | ||
<ResponseField name="body" type="ArrayBuffer"> | ||
The raw HTTP response body, as an `ArrayBuffer`. | ||
|
||
<Tip> | ||
The response body isn't normally read directly. Instead, use `response.text()` or `response.json<T>()` functions. | ||
</Tip> | ||
</ResponseField> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters