dart-lang / dart-lang/http

[Http] ClientException. Failed to Parse HTTP. 67 does not match 13.

Open
#503 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
1.1k
Forks
419
Avg merge
4d 14h
Merged PRs (30d)
8

Description

**Steps to Reproduce**
1. Create a new project.
2. Import the package http or dio.
3. Make a simple post http request to a rest api.

**Expected results:**
1. I have executed the same rest api on postman and it worked.
2. I need execute a simple post http request, using the http package or dio.

**Actual results:**

The error occurs when execute the http.Post request, ClientException. Failed to Parse HTTP. 67 does not match 13.
![Sem título](https://user-images.githubusercontent.com/18061819/100872125-19e79e00-3480-11eb-84fa-b2ee5144c0c0.png)

The code.
![Sem título2](https://user-images.githubusercontent.com/18061819/100872162-24a23300-3480-11eb-8f04-6840fece6a57.png)

Flutter doctor, I have tried resolve this issues below, but I'm managing to run the flutter except for this error
![doctor](https://user-images.githubusercontent.com/18061819/100872181-2966e700-3480-11eb-9db9-6b5b3d7982db.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the POST request with the Dart http package in a new Flutter project, using the code and Flutter doctor details shown in the issue. Compare the failing request with the working Postman request and determine what causes the HTTP parser to reject 67 versus 13; done means the request completes without ClientException.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
api, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.