[MDEV-27516] feature request: HTTP_REQUEST() function Created: 2022-01-15  Updated: 2022-01-15

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Robert Dyas Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: functions


 Description   

Use case: I would like to make REST API calls from within my triggers and stored procedures to integrate with other systems.

I envision an implementation like this:

HTTP_REQUEST(method ENUM('GET','POST','PUT','DELETE','HEAD') NOT NULL, 
  url VARCHAR(2048) NOT NULL, 
  headers JSON, 
  body MEDIUMTEXT, 
  opts JSON)
RETURNS JSON object like this:
{
"ResponseCode": 200,
"ResponseHeaders": {"key1":["value1"], "key2":["valueA","valueB"]},
"ResponseBody": "string which could be JSON"
}

The opts parameter, if specified, could contain overrides of default values like this:

{"RequestTimeoutSeconds":60, "AllowRedirects":true}

We have a ton of use cases for this and would love to see it in 10.8 if possible to expand the JSON uses cases for MariaDB.


Generated at Thu Feb 08 09:53:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.