Send HTTP Request action allows sending different types of requests.
Scheduled and Triggered Actions
Example of Send HTTP Request action configuration in Scheduled Actions to create site groups
URL: [[@Web.Url]]/_api/web/sitegroups
Request Type: POST
Headers:
Content-Type: application/json
Accept: application/json;odata=nometadata
Data:
=JSON.stringify({
'Title': 'ContactsGroup',
'Description': 'Contacts group description',
})
Modern Forms, List Actions and Automation Actions
Example of Send HTTP Request action configuration in Modern Forms to update item Status field value
URL: [[@Web.Url]]/_api/web/lists/GetByTitle('Expenses')/items([[ID]])
Request Type: POST
Headers:
X-HTTP-Method: MERGE
If-Match: *
Content-Type: application/json
Accept: application/json;odata=nometadata
Data:
=JSON.stringify({
'Status': 'Completed'
})
Differences between two actions (available only in Modern Forms, List Actions, Automation Actions):
- Append X-RequestDigest
- Use proxy server to fix CORS error
For more information about Action Builder read Action Builder introduction article.
When action Send HTTP Request is selected, the following additional properties should be specified.
Configuration
Property | Required | Type | Description |
Url |
yes | String | URL or expression to be evaluated as URL. |
Request type |
yes | Choice | Provides options for choosing one of the following types: GET, POST, PUT, DELETE, JSONP |
Headers |
no | String | Enter any key-value pairs you need to send along with your request |
Append X-RequestDigest |
no | Boolean | Add valid request digest to validate posts back to SharePoint. Required when making a request to SharePoint. Note: This property is available in Modern Forms, List Actions and Automation Actions |
Use proxy server to fix CORS error |
no | Boolean |
Required to overcome cross-domain requests. How to fix CORS error |
Data |
no | String | Data to be sent to the server |
Test configuration
Allows you to execute and test the configured HTTP request.
Note: Clicking the Test button will execute the request immediately
Availability
Modern Forms | List Actions | Scheduled/Triggered Actions |
✓ | ✓ | ✓ |
Output
Output Parameter | Type | Description |
ResponseBody | Returns response value of request. |