Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Encoding problems in response sent by the API #89

@PierreHachard

Description

@PierreHachard

Current API code uses the PowerShell method ConvertFrom-JSON in the request method

This leads to encoding corruption in the response gotten from the API :

image

By adding a .Content before calling the method ConvertFrom-JSON the encoding corruption in the response is no longer present:

image

From: https://stackoverflow.com/questions/53033242/powershell-convertfrom-json-encoding-special-characters-issue

The same response mentions that the use of Invoke-RestMethod instead of Invoke-WebRequest may also fix the problem.


Consider fixing this everywhere it is necessary, also checking the behaviour for paginated requests

At least the following use cases should be verified:

  • the fact that the result is correctly printed in the powershell console, without corruption;
  • the fact that the result is correctly printed using a script;
  • the fact that uploading an object to the API using the properties of an object fetched from the API works;
  • the fact that uploading an object to the API with local updates works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions