Server Request (Obsolete)
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens,HTTP,JSON
Sends an HTTP request to a URL and saves the response in tokens.
This action is obsolete. Use Server Request instead. It has the same parameters, plus file uploads and client certificates. See Migrating to Server Request.
This action requires the Data Integration feature to be licensed.
Typical Use Cases
- Keep existing applications that already use it running
- Call a REST API or webhook with form, JSON or XML data
Don't use it to
- Build anything new. Use Server Request.
- Upload files or use a client certificate. Only Server Request supports them.
Related Actions
| Action Name | Description |
|---|---|
| Server Request | The replacement for this action. |
| Parse JSON Into Tokens | Turns a JSON response into tokens. |
| Regex | Extracts values from a text response. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| URL | The address to send the request to. Can be absolute or relative to the portal. | Yes | http://example.com | Yes |
| Url Token Encoding | How token values in the URL are encoded. URL Encoding URL-encodes each token value. No Encoding inserts token values as they are. Use it when a token holds a whole URL or a path with /. | No | URL Encoding | No |
| Enforce SSL | Rewrites the URL to use https instead of http. | No | false | No |
| Timeout | How many seconds to wait for the response. Empty or 0 means 100 seconds. | Yes | 100 | No |
| Choose an HTTP Method | GET, HEAD, POST, PUT, PATCH or DELETE. | No | GET | Yes |
| Data | The request data. For GET, each key=value line is added to the query string. For POST, PUT and PATCH, it's the body, in the format of the Content-Type header. | Yes | Sample lines name=[FirstName] and page=[Tab:TabName] | No |
| Do not escape tokens in Data | For XML bodies only. By default, token values in Data are XML-escaped. Check this when a token holds XML that must be inserted as is. | No | false | No |
| Disable Referer Header | By default, a Referer header with the current site address is sent. Check this to leave it out. | No | false | No |
| Headers | Extra request headers, as rows of name and value. | Yes (both columns) | Empty | No |
| Use DNN Proxy Settings | Sends the request through the proxy set in the DNN host settings. | No | false | No |
| Add Current Cookies | Sends the current user's browser cookies with the request. | No | false | No |
| Ignore Errors | Continues with the next actions when the request fails. On Error still runs. | No | false | No |
| On Error | Actions to run when the request fails. [<OutputTokenName>:ErrorCode] has the HTTP status code and [<OutputTokenName>:ErrorResponse] the response body. | No | Empty | No |
Output Parameters Reference
| Parameter | Description |
|---|---|
| Output Token Name | The name of the token that receives the response body, for example ApiResponse for [ApiResponse]. |
| Output Headers | Response headers to save, as rows of header name and token name. For a token named Location, you get [Location] and [Location:Json] (all values as a JSON array). [Location:Csv] isn't created by this action. |
| Cookie Container | A name for a cookie container that keeps cookies between Server Request actions that use the same name. |
The response body is also saved in the [HttpResponse] token. It's kept for old applications only, so use Output Token Name instead.
Behavior
- Form data. Without a JSON or XML
Content-Type,Datais sent askey=valuepairs joined with&. Values are URL-encoded for you.Content-Typedefaults toapplication/x-www-form-urlencodedforPOST,PUT,PATCHandDELETE. - JSON and XML. With a JSON
Content-Type, token values are inserted without escaping, so a double quote in a value breaks the JSON. With an XMLContent-Type, they're XML-escaped unlessDo not escape tokens in Datais checked. - DELETE sends an empty form body.
Datais ignored. - Errors. A failed request runs
On Error. IfOn Errordoesn't end execution andIgnore Errorsisn't checked, the action fails withServer request to the following URL failed:, the URL and the server's response. All users see this message. - Ignored errors. When
Ignore Errorsis checked, the error response, or the error message if there was no response, is saved in[<OutputTokenName>].
Migrating to Server Request
Change the action type from PostData to ServerRequestHttpClient. All parameter IDs are the same, so the values carry over:
| Server Request (Obsolete) | Server Request | Notes |
|---|---|---|
| URL, Url Token Encoding, Enforce SSL, Timeout | Same | No change. |
| Choose an HTTP Method, Data, Do not escape tokens in Data | Same | DELETE sends no body in either action. |
| Headers, Disable Referer Header, Use DNN Proxy Settings, Add Current Cookies | Same | No change. |
| Ignore Errors, On Error | Same | Administrators see more detail in the error message. |
| Output Token Name, Cookie Container | Same | With Ignore Errors, [<OutputTokenName>] holds the server's error body, not an error message, when the request fails. |
| Output Headers | Same | Also creates [<Token>:Csv]. Content headers such as Content-Type can't be read. |
[HttpResponse] token | None | Use [<OutputTokenName>] instead. |
| None | Client Certificate, Files, File Identifiers | New options. |
Considerations
- Clear the sample Data. With
GET, the sample lines inDataare added to the query string. - Portal context. Relative URLs and the
Refererheader need a portal, such as in forms or Automation. Where there's no portal, use an absolute URL and checkDisable Referer Header. - Keep secrets out of the action. Put API keys and passwords in tokens, not as plain text.
Examples
To understand how to use the below examples, please see Running Examples.
1. Post form data to a webhook
This action posts two form fields and saves the response in [WebhookResponse]. To migrate it, change ActionType to ServerRequestHttpClient.
{
"Title": "Server Request (Obsolete)",
"ActionType": "PostData",
"Description": "Notify the webhook about a new signup",
"Parameters": {
"URL": "https://api.example.com/webhooks/signup",
"HttpMethod": "POST",
"Data": "email=[Email]\nsource=website",
"Headers": [
{
"name": "X-Api-Key",
"value": "[ApiKey]"
}
],
"OutputTokenName": "WebhookResponse"
}
}
Revised 09/26/2026