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

A JSON containing headers and data for the request.

Available Pages

This method can be used in the following pages:

  • Plug-in Settings

Sample

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
var config = kintone.plugin.app.getProxyConfig('https://api.example.com', 'GET');
console.log(config);

// returns
// {
//   "headers": {
//     "Content-Type": "application/json",
//     "Authorization": "1234567890abcdefg"
//   },
//   "data": {}
// }