Proxy Get Config

Proxy Get Config - kintone.plugin.app.getProxyConfig()

Retrieves the headers and data that will be added to the request when running a REST API with kintone.plugin.app.proxy(). This information will first need to be saved using the kintone.plugin.app.setProxyConfig() API.

Function

kintone.plugin.app.getProxyConfig(url, method)

Parameters

PARAMETER TYPE REQUIRED DESCRIPTION
url String Yes The REST API and URL
method String Yes The HTTP method. Specify one of the following: GET / POST / PUT / DELETE.

Response

1
2
3
4
5
6
7
{
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "1234567890abcdefg"
  },
  "data": {}
}

Available Pages

This method can be used in the following pages:

  • Plug-in Settings

Sample

1
2
var config = kintone.plugin.app.getProxyConfig('https://api.example.com', 'GET');
console.log(config);