Skip to content

Problem with UTF-8 encoding in API calls #133

@sl985

Description

@sl985

Problem with UTF-8 encoding in API calls

Expected behavior (required)

When creating international projects, I come across specific characters of the alphabet. Using an API call, I receive a response from a POST request, I expect support for UTF-8 encoding.

Current behavior (required)

At the moment I get a response from the API server (e.g. from OpenAI.com) encoded as UTF-8, unfortunately the international characters are displayed (processed) incorrectly.

For example, requests in Postman display correctly.

To Reproduce (required)

The problem probably affects all APIs.
Example: Send a simple json request to the openAI.com API (registration and many uses are free)

  1. In FlutterFlow add new API Calls:

Method Type: POST
API URL: https://api.openai.com/v1/completions

Headers
Content-Type: application/json; charset=UTF-8 Authorization: Bearer YOUR SECRET KEY

Body json
{ "model": "text-davinci-002", "prompt": "Człowiek: Napisz mini opowiadanie o kocie", "temperature": 0.7, "max_tokens": 256, "top_p": 1, "frequency_penalty": 0, "presence_penalty": 0 }

  1. Send response and test (Test api call)

  2. The response is not displayed correctly despite UTF-8 encoding.

Context (required)

Currently, integration with external services in an international environment is not possible.

Screenshots / recordings

FlutterFlow:
https://ibb.co/2dqJCgk

PostMan:
https://ibb.co/Sv8ZQbj

Your environment

  • Bug Report Code:
  • Version of FlutterFlow used: 3.3.4
  • Platform (e.g. Web, MacOS Desktop): MacOS
  • Browser name and version: Chrome
  • Operating system and version (desktop or mobile): both

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions