aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.28k stars 235 forks source link

AWSHttpRequest body creation fails on web #4847

Open livioschlaepfer opened 1 week ago

livioschlaepfer commented 1 week ago

Description

Using AWSHttpRequest from package aws_common fails to create a request body on web. See attached screenshots of created request mobile vs web.

Categories

Steps to Reproduce

  1. Create an AWSHttpRequest

final request = AWSHttpRequest.post( Uri.parse(''), headers: const { AWSHeaders.contentType: 'application/json', }, body: json.encode({ 'first_name': 'max', 'last_name': 'muster', }).codeUnits, );

  1. Compare created request on mobile and web

Screenshots

Generated request object on web:

image

Generated request object on mobile:

image

Platforms

Flutter Version

3.16.8

Amplify Flutter Version

aws_common: 0.6.3

Deployment Method

Amplify CLI

Schema

No response

khatruong2009 commented 1 week ago

Hi @livioschlaepfer, we will take a look at this issue and get back to you when we have an update.