Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application/json format. #76

Open
bsjung opened this issue Feb 1, 2020 · 0 comments
Open

application/json format. #76

bsjung opened this issue Feb 1, 2020 · 0 comments

Comments

@bsjung
Copy link

bsjung commented Feb 1, 2020

I've tested the JSON request for my project.

This is my dart client is at
https://github.com/bsjung/start_examples/blob/master/jwt/server/client.dart.

The header is set to {'Content-Type': "application/json"}.
But, the most client software appends to UTF encoding into HTTP header : [application/json; charset=utf-8].

The isMime() loose default is false.
Thus I think the loose default option should be set the true for client software.


16 bool isMime(String type, {loose: false}) =>
17 _request.headers[HttpHeaders.contentTypeHeader]
18 .where((value) => loose ? value.contains(type) : value == type)
19 .isNotEmpty;


Benjamin Jung ( bsjung@gmail.com )

This was referenced Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant