HTTPS

You can grab data from any HTTP/HTTPS endpoint and have it pulled into Snapboard for use in your cards.

There are 3 fields to configure your HTTPS request:

  • URL - The only required field is the URL to send the request to.
  • Method - the type of request - defaults to GET
  • Options - additional options that modify the request - this is a JSON object of additional details.

Options Reference

Field must be formatted in JSON (as shown below). You only need to include the values below that you need.

{  
  // `params` are the URL parameters to be sent with the request. E.g the following would add ?id=12345&api_token=789 to the end of the URL
  "params": {
    "id": 12345,
    "api_token": "789"
  },

  // `data` is sent as the body of the request
  "data": {
    "firstName": "Fred"
  },

  // `headers` are custom headers to be sent
  "headers": {"X-Requested-With": "XMLHttpRequest"},

  // `timeout` specifies the number of milliseconds before the request times out.If the request takes longer than `timeout`, the request will be aborted.
  "timeout": 1000, // default is `0` (no timeout)

  // `withCredentials` indicates whether or not cross-site Access-Control requests should be made using credentials
  "withCredentials": false, // default

  // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. This will set an `Authorization` header, overwriting any existing `Authorization` custom headers you have set using `headers`. Please note that only HTTP Basic auth is configurable through this parameter. For Bearer tokens and such, use `Authorization` custom headers instead.
  "auth": {
    "username": "janedoe",
    "password": "s00pers3cret"
  },

  // `responseEncoding` indicates encoding to use for decoding responses. Note: Ignored for `responseType` of 'stream' or client-side requests
  "responseEncoding": "utf8",

  // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
  "xsrfCookieName": "XSRF-TOKEN",

  // `xsrfHeaderName` is the name of the http header that carries the xsrf token value
  "xsrfHeaderName": "X-XSRF-TOKEN",

  // `maxContentLength` defines the max size of the http response content in bytes allowed
  "maxContentLength": 2000,

  // `maxRedirects` defines the maximum number of redirects to follow in node.js. If set to 0, no redirects will be followed.
  "maxRedirects": 5, // default

  // 'proxy' defines the hostname and port of the proxy server. You can also define your proxy using the conventional `http_proxy` and `https_proxy` environment variables. If you are using environment variables for your proxy configuration, you can also define a `no_proxy` environment variable as a comma-separated list of domains that should not be proxied. Use `false` to disable proxies, ignoring environment variables. `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and supplies credentials. This will set an `Proxy-Authorization` header, overwriting any existing `Proxy-Authorization` custom headers you have set using `headers`.
  "proxy": {
    "host": "127.0.0.1",
    "port": 9000,
    "auth": {
      "username": "mikeymik",
      "password": "rapunz3l"
    }
  }
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.