Skip to content

Wrong format of urlencoded list #5

@lotooo

Description

@lotooo

Describe the bug

When using this library trying to update an existing check, I receive a 400 because some fields use the wrong format.

The 2 specific fields I tested that a reporting bad format are tags and 'contact_groups.

To Reproduce
Steps to reproduce the behavior:

  1. Call update_uptime_test with a list as tags or contact_groups
  2. You receive a 400

Expected behavior

It works and respect the docs in https://www.statuscake.com/api/v1/#tag/uptime/operation/update-uptime-test

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

I enabled urllib debug level and it seems the generated URL is using contact_groups=111111&contact_groups=111112 instead of contact_groups[]=111111&contact_groups[]=111112, not sure it's a SDK/library problem, I did a workaround using requests and I had to rename the attributes to make them work.

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