Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27516

feature request: HTTP_REQUEST() function

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rdyas Robert Dyas
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.