Skip to content

PurgeApi: bulkPurgeTag returns an object with index as keys and each letter of value as value #27

Open
@Crowelling

Description

@Crowelling

Version

"fastly": "7.1.0"

What happened

When i try to get the response for the request

import * as Fastly from 'fastly';

const token = 'my-token';
Fastly.ApiClient.instance.authenticate(token);
const fastlyPurgeApi = new Fastly.PurgeApi();

const options = {
      service_id: 'my-service-id',
      fastly_soft_purge: 1,
      purge_response: {
        surrogate_keys: ['dev', 'android'],
      },
    };

const response = await this.fastlyPurgeApi.bulkPurgeTag(options);

, i'm getting the response as object and it looks like this:

  '0': '{',
  '1': ' ',
  '2': '"',
  '3': 'd',
  '4': 'e',
  '5': 'v',
  '6': '"',
  '7': ':',
  '8': ' ',
  '9': '"',
  '10': '1',
  '11': '4',
  '12': '1',
  '13': '0',
  '14': '0',
  '15': '3',
  '16': '4',
  '17': '-',
  '18': '1',
  '19': '7',
  '20': '1',
  '21': '3',
  '22': '2',
  '23': '2',
  '24': '7',
  '25': '2',
  '26': '7',
  '27': '7',
  '28': '-',
  '29': '4',
  '30': '0',
  '31': '2',
  '32': '2',
  '33': '8',
  '34': '4',
  '35': '8',
  '36': '"',
  '37': ',',
  '38': ' ',
  '39': '"',
  '40': 'a',
  '41': 'n',
  '42': 'd',
  '43': 'r',
  '44': 'o',
  '45': 'i',
  '46': 'd',
  '47': '"',
  '48': ':',
  '49': ' ',
  '50': '"',
  '51': '1',
  '52': '4',
  '53': '1',
  '54': '0',
  '55': '0',
  '56': '3',
  '57': '4',
  '58': '-',
  '59': '1',
  '60': '7',
  '61': '1',
  '62': '3',
  '63': '2',
  '64': '2',
  '65': '7',
  '66': '2',
  '67': '7',
  '68': '7',
  '69': '-',
  '70': '4',
  '71': '0',
  '72': '2',
  '73': '2',
  '74': '8',
  '75': '4',
  '76': '9',
  '77': '"',
  '78': ' ',
  '79': '}'
}

Is it okay response? Or not? I didn't find any information about it, in docs, or in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions