-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add changelog and callbacks documentation Remove old documentation and images
- Loading branch information
Showing
409 changed files
with
1,118 additions
and
3,161 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
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,36 @@ | ||
--- | ||
title: Overview | ||
meta: | ||
title: Callbacks overview | ||
description: Learn how to create callbacks in Mockoon and how to trigger them from your route responses | ||
order: 650 | ||
--- | ||
|
||
# Callbacks overview | ||
|
||
--- | ||
|
||
## What are callbacks? | ||
|
||
Callbacks are a way to **make one or more HTTP calls** after an entering request reaches your route. This is useful to **call other APIs or micro-services or to trigger a webhook**. | ||
|
||
Callbacks are fully configurable and are created at the environment level, like the [data buckets](docs:data-buckets/overview). | ||
|
||
## Create a callback | ||
|
||
To create a new callback, open the **Callbacks** options by clicking on the tab at the top of the window: | ||
|
||
![click on the callbacks tab at the top{955x160}](docs-img:open-callbacks-view.png) | ||
|
||
Add a new callback by clicking on the "plus" button: | ||
|
||
![Add a new callback by clicking on the plus button{1495x578}](docs-img:add-callback.png) | ||
|
||
## Configure a callback | ||
|
||
The callback configuration interface is very similar to the route response interface. You can configure the callback's **name**, **description**, **method**, **URL**, **body**, and **headers**: | ||
|
||
- **URL**: the URL to call. Supports [templating helpers](docs:templating/overview). | ||
- **Method**: the HTTP method to use for the call. Only some methods support a body (`POST`, `PUT`, and `PATCH`). | ||
- **Body**: the body to send with the call. You can serve an inline body, a file, or the content of a [data bucket](docs:data-buckets/overview). They support templating too. Please refer to the [response body](docs:response-configuration/response-body) documentation for more details. | ||
- **Headers**: the headers to send with the call. They support our [templating helpers](docs:templating/overview). |
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,25 @@ | ||
--- | ||
title: Using callbacks | ||
meta: | ||
title: Using callbacks | ||
description: Learn how to use Mockoon's callbacks, link them to your route responses and delay their execution | ||
order: 651 | ||
--- | ||
|
||
# Using callbacks | ||
|
||
--- | ||
|
||
After [creating callbacks](docs:callbacks/overview), you can link them in your route responses and delay their execution. | ||
|
||
## Link a callback to a route response | ||
|
||
To link a callback to a route response, choose "Callbacks" in the route response menu: | ||
|
||
![click on the callbacks tab in the route response menu{1228x153}](docs-img:open-route-response-callbacks.png) | ||
|
||
Then, click on the "plus" button to add a new callback, and select the callback you want to link: | ||
|
||
![click on the plus button to add a new callback{1208x234}](docs-img:link-callback-response.png) | ||
|
||
> 💡 You can **delay a callback execution** by adding a delay in milliseconds in the "Callback latency" field. |
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
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
Oops, something went wrong.