GithubHelp home page GithubHelp logo

Comments (5)

khatruong2009 avatar khatruong2009 commented on June 14, 2024

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

from amplify-flutter.

livioschlaepfer avatar livioschlaepfer commented on June 14, 2024

@khatruong2009 are there any updates on this?

from amplify-flutter.

Jordan-Nelson avatar Jordan-Nelson commented on June 14, 2024

@livioschlaepfer I am not able to reproduce the exact issue you are facing. I see there is a body on both web and mobile. The body doesn't seem to display correctly in Dart's dev tools when running on web (see screenshot below).

Screenshot 2024-06-11 at 5 07 47 PM

However, the body is present. I can listen to it an receive data (see code snippet below). I also see the body in Chrome's dev tools when I make the request. I am unsure why it is not displaying correctly in Dart's dev tools. This maybe be an issue with Dart's dev tools.

Is the issue you are facing consistent with what I have described?

Here is the code snippet I was using:

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: Center(
          child: Column(
            children: [
              FilledButton(
                onPressed: () {
                  final request = AWSHttpRequest.post(
                    Uri.parse('https://jsonplaceholder.typicode.com/posts'),
                    headers: const {
                      AWSHeaders.contentType: 'application/json; charset=UTF-8',
                    },
                    body: jsonEncode({
                      'title': 'foo',
                      'body': 'bar',
                      'userId': 1,
                    }).codeUnits,
                  );
                  request.body.listen((data) => safePrint('got data: $data'));
                  safePrint('body: ${request.body}');
                  request.send();
                },
                child: const Text('request'),
              ),
            ],
          ),
        ),
      ),
    );
  }

from amplify-flutter.

Jordan-Nelson avatar Jordan-Nelson commented on June 14, 2024

@livioschlaepfer if you are not seeing the value at all it is likely because you have the following dart settings disabled: Show Getters In Debug Views. You can follow this comment to enable/disable it.

from amplify-flutter.

Jordan-Nelson avatar Jordan-Nelson commented on June 14, 2024

I created a minimal reproduction of this and opened an issue here. This seems like a dart issue to me but maybe it is intentional that this is not supported. Either way I don't think it is a bug in amplify_common. I am going to update this to a question for now.

from amplify-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.