mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
44 lines
1.2 KiB
Markdown
44 lines
1.2 KiB
Markdown
|
|
### HTTP Adapter
|
||
|
|
|
||
|
|
This is a generic adapter for sending notifications via HTTP requests.
|
||
|
|
You can leverage this adapter to integrate with various webhooks or APIs that accept HTTP requests. (e.g. Supabase
|
||
|
|
Functions, a Node.js server, etc.)
|
||
|
|
|
||
|
|
HTTP adapter supports a `authToken` field, which can be used to include an authorization token in the request headers.
|
||
|
|
Your token would be included as a Bearer token in the `Authorization` header, which is a common method for securing API requests.
|
||
|
|
|
||
|
|
Request Details:
|
||
|
|
<details>
|
||
|
|
Request Method: POST
|
||
|
|
|
||
|
|
Headers:
|
||
|
|
|
||
|
|
```
|
||
|
|
Content Type: `application/json`
|
||
|
|
Authorization: Bearer {your-optional-auth-token}
|
||
|
|
```
|
||
|
|
|
||
|
|
Body:
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"jobId": "mg1waX4RHmIzL5NDYtYp-",
|
||
|
|
"provider": "immoscout",
|
||
|
|
"timestamp": "2024-06-15T12:34:56Z",
|
||
|
|
"listings": [
|
||
|
|
{
|
||
|
|
"address": "Str. 123, Bielefeld, Germany",
|
||
|
|
"description": "Möbliert: Einziehen & wohlfühlen: Neu möbliert.",
|
||
|
|
"id": "123456789",
|
||
|
|
"imageUrl": "https://<target-url>.com/listings/123456789.jpg",
|
||
|
|
"price": "1.240 €",
|
||
|
|
"size": "38 m²",
|
||
|
|
"title": "Schöne 1-Zimmer-Wohnung in Bielefeld",
|
||
|
|
"url": "https://<target-url>.com/listings/123456789"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
</details>
|