Dig deeper into fetcher requests and responses

When developing a Pack that integrates with an external API it’s extremely useful to examine the HTTP requests and responses. Using the Pack maker tools you can see exactly what requests your Pack made and the responses it got back.

While the interface worked well for quick spot checks, it didn’t always scale to larger problems, like finding a record in a long list, etc. To help with these cases we added two new buttons to the UI: Copy Request and Copy Response.

These buttons allow you to copy the entire request or response details as JSON, which you can then pour through using the text editor of your choice.

Request

{
  "method": "GET",
  "cacheTtlSecs": 300,
  "headers": {},
  "url": "https://api.exchangerate.host/latest?base=CAD&amount=100"
}

Response

{
  "status": 200,
  "headers": {
    "access-control-allow-credentials": "<<<REDACTED by Coda>>>",
    "access-control-allow-headers": "<<<REDACTED by Coda>>>",
    "access-control-allow-methods": "<<<REDACTED by Coda>>>",
    "access-control-allow-origin": "<<<REDACTED by Coda>>>",
    "alt-svc": "<<<REDACTED by Coda>>>",
    "cache-control": "<<<REDACTED by Coda>>>",
    "cf-cache-status": "<<<REDACTED by Coda>>>",
    "cf-ray": "<<<REDACTED by Coda>>>",
    "connection": "<<<REDACTED by Coda>>>",
    "content-encoding": "<<<REDACTED by Coda>>>",
    "content-type": "application/json; charset=utf-8",
    "date": "Wed, 15 Feb 2023 20:10:18 GMT",
    "etag": "W/\"cb8-j8eJqpIYGrICJKA4WgJ9eyqDzW4\"",
    "nel": "<<<REDACTED by Coda>>>",
    "report-to": "<<<REDACTED by Coda>>>",
    "server": "<<<REDACTED by Coda>>>",
    "strict-transport-security": "<<<REDACTED by Coda>>>",
    "transfer-encoding": "<<<REDACTED by Coda>>>",
    "vary": "Accept-Encoding",
    "x-content-type-options": "<<<REDACTED by Coda>>>",
    "x-dns-prefetch-control": "<<<REDACTED by Coda>>>",
    "x-download-options": "<<<REDACTED by Coda>>>",
    "x-forwarded-for": "<<<REDACTED by Coda>>>",
    "x-frame-options": "<<<REDACTED by Coda>>>",
    "x-ratelimit-limit": "2000",
    "x-ratelimit-remaining": "1957",
    "x-xss-protection": "<<<REDACTED by Coda>>>"
  },
  "body": {
    "motd": {
      "msg": "If you or your company use this project or like what we doing, please consider backing us so we can continue maintaining and evolving this project.",
      "url": "https://exchangerate.host/#/donate"
    },
    "success": true,
    "base": "CAD",
    "date": "2023-02-15",
    "rates": {
      "AED": 274.886567,
      "AFN": 6701.093412,
      "ALL": 8077.879735,
      "AMD": 29562.278988,
      "ANG": 135.096509,
      "AOA": 37739.567819,
      "ARS": 14367.329203,
      "AUD": 107.966469,
      "AWG": 134.883946,
      "AZN": 127.246967,
      "BAM": 136.328063,
      "BBD": 149.69074,
      "BDT": 8015.820996,
      "BGN": 136.491091,
      "BHD": 28.229442,
      "BIF": 155602.472022,
      "BMD": 74.874818,
      "BND": 99.484152,
      "BOB": 517.864248,
      "BRL": 388.585547,
      "BSD": 74.871474,
      "BTC": 0.003386,
      "BTN": 6200.067113,
      "BWP": 978.335444,
      "BYN": 189.158448,
      "BZD": 151.094383,
      "CAD": 100,
      "CDF": 155865.126546,
      "CHF": 69.121212,
      "CLF": 2.179781,
      "CLP": 58912.25628,
      "CNH": 512.719877,
      "CNY": 512.121182,
      "COP": 362744.1809,
      "CRC": 42858.282717,
      "CUC": 74.890148,
      "CUP": 1926.806365,
      "CVE": 7682.507727,
      "CZK": 1655.884048,
      "DJF": 13342.279811,
      "DKK": 520.220362,
      "DOP": 4212.468864,
      "DZD": 10215.706512,
      "EGP": 2289.182462,
      "ERN": 1122.39897,
      "ETB": 4026.312492,
      "EUR": 69.866125,
      "FJD": 163.505788,
      "FKP": 61.586375,
      "GBP": 61.594368,
      "GEL": 198.737368,
      "GGP": 61.579038,
      "GHS": 918.003241,
      "GIP": 61.623735,
      "GMD": 4575.621051,
      "GNF": 645157.852551,
      "GTQ": 587.332695,
      "GYD": 15811.551862,
      "HKD": 587.351682,
      "HNL": 1847.360789,
      "HRK": 525.952894,
      "HTG": 11315.174832,
      "HUF": 26457.853416,
      "IDR": 1137539.965623,
      "ILS": 263.609536,
      "IMP": 61.616573,
      "INR": 6199.829384,
      "IQD": 109240.673106,
      "IRR": 3161372.065962,
      "ISK": 10701.57391,
      "JEP": 61.639561,
      "JMD": 11550.491129,
      "JOD": 53.116371,
      "JPY": 9956.986522,
      "KES": 9386.897195,
      "KGS": 6507.547884,
      "KHR": 306257.199057,
      "KMF": 34335.532777,
      "KPW": 67342.869396,
      "KRW": 96058.450778,
      "KWD": 22.95271,
      "KYD": 62.370017,
      "KZT": 33628.384686,
      "LAK": 1262914.209006,
      "LBP": 1124774.055706,
      "LKR": 27306.129205,
      "LRD": 11762.58554,
      "LSL": 1337.951369,
      "LYD": 360.193824,
      "MAD": 770.932983,
      "MDL": 1402.466857,
      "MGA": 323710.3929,
      "MKD": 4285.355501,
      "MMK": 157363.118051,
      "MNT": 254927.490099,
      "MOP": 604.947598,
      "MRU": 2724.642576,
      "MUR": 3430.798252,
      "MVR": 1148.591331,
      "MWK": 76915.811153,
      "MXN": 1386.50603,
      "MYR": 327.995315,
      "MZN": 4777.623221,
      "NAD": 1340.112707,
      "NGN": 34461.593635,
      "NIO": 2738.131506,
      "NOK": 762.051214,
      "NPR": 9919.905294,
      "NZD": 118.767009,
      "OMR": 28.84977,
      "PAB": 74.857303,
      "PEN": 289.187942,
      "PGK": 264.064275,
      "PHP": 4128.511777,
      "PKR": 20026.34676,
      "PLN": 333.432785,
      "PYG": 545125.735416,
      "QAR": 273.876581,
      "RON": 342.106786,
      "RSD": 8187.572148,
      "RUB": 5530.822203,
      "RWF": 81335.627903,
      "SAR": 280.797812,
      "SBD": 614.390344,
      "SCR": 1020.372018,
      "SDG": 43698.063846,
      "SEK": 778.086442,
      "SGD": 99.809601,
      "SHP": 61.595205,
      "SLL": 1321790.312767,
      "SOS": 42597.700737,
      "SRD": 2430.103244,
      "SSP": 9746.835189,
      "STD": 1707813.642841,
      "STN": 1707.035743,
      "SVC": 654.644411,
      "SYP": 188001.010349,
      "SZL": 1337.990991,
      "THB": 2552.881526,
      "TJS": 781.269591,
      "TMT": 261.961498,
      "TND": 233.627303,
      "TOP": 174.506829,
      "TRY": 1411.518452,
      "TTD": 507.937988,
      "TWD": 2271.029568,
      "TZS": 175197.781504,
      "UAH": 2754.016725,
      "UGX": 274488.419755,
      "USD": 74.878839,
      "UYU": 2934.526624,
      "UZS": 850016.116951,
      "VES": 1808.461103,
      "VND": 1767459.133109,
      "VUV": 8832.754273,
      "WST": 201.822724,
      "XAF": 45790.602593,
      "XAG": 3.48434,
      "XAU": 0.137639,
      "XCD": 202.282286,
      "XDR": 56.105037,
      "XOF": 45790.591599,
      "XPD": 0.118924,
      "XPF": 8330.285769,
      "XPT": 0.139566,
      "YER": 18728.871634,
      "ZAR": 1344.25253,
      "ZMW": 1449.649365,
      "ZWL": 24093.826168
    }
  }
}

We hope you find this feature useful, and let us know if you have any feedback on other functionality that would help you develop or debug your Packs.

8 Likes

Super useful for also creating mocked data, thanks!

1 Like

Extra useful ! Thank you !
I used to console.log(JSON.stringify(data)) and copy back to IDE for this :sweat_smile:

1 Like

great for debugging with 3rd parties on pack development, super-useful to send these for support.

1 Like