Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwuno committed Jan 5, 2025
1 parent 726132b commit 2058530
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/content/doc-surrealql/functions/database/http.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ From version `2.2` of SurrealDB, the HTTP functions have been improved to provid
- SurrealQL **string values** are sent as raw strings.
- All other SurrealQL values (numbers, arrays, objects, booleans, etc.) are automatically JSON-encoded.

- **Removal of `Content-Type: application/octet-stream`**: SurrealDB no longer automatically adds `Content-Type: application/octet-stream` to responses when the body contains SurrealQL byte values. If you need this header, you can set it manually.
- **Manual Header Configuration**: SurrealDB no longer automatically adds `Content-Type: application/octet-stream` to responses when the body contains SurrealQL byte values. If you need this header, you can set it manually.

## `http::head`

Expand Down Expand Up @@ -96,7 +96,9 @@ null

## `http::get`

The `http::get` function performs a remote HTTP GET request. The first parameter is the URL of the remote endpoint. If the response does not return a 2XX status code, then the function will fail and return the error. If the remote endpoint returns an `application/json content-type`, then the response is parsed and returned as a value, otherwise the response is treated as text.
The `http::get` function performs a remote HTTP `GET` request. The first parameter is the URL of the remote endpoint. If the response does not return a 2XX status code, then the function will fail and return the error.

If the remote endpoint returns an `application/json content-type`, then the response is parsed and returned as a value, otherwise the response is treated as text.

```surql title="API DEFINITION"
http::get(string) -> value
Expand Down

0 comments on commit 2058530

Please sign in to comment.