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

Flutter: FormatException: Scheme not starting with alphabetic character (at character 1) #34

Open
fgonga opened this issue May 1, 2024 · 3 comments

Comments

@fgonga
Copy link

fgonga commented May 1, 2024

Acredito estar fazendo tudo correcto. porque estou recebendo esse erro?
Posso afirmar que a url esta correcta.

static Future login(String id, String password) async {
final uno = Uno(
baseURL: 'https://b.com/api',
headers: {'X-Custom-Header': 'foobar'}
);

final json = {
  'id': id,
  'password': password
};

await uno.post('/login', data: json).then((response){
  print(response.data); // it's a Map<String, dynamic>.
}).catchError((error){
  print(error); // It's a UnoError.
});

return "";

}

@OrlandoEduardo101
Copy link
Contributor

Sabe informar se a resposta do body dessa API é null? Encontrei um erro quando quando a API retorna nulo, pode estar relacionado

OrlandoEduardo101 added a commit that referenced this issue Jun 5, 2024
jacobaraujo7 added a commit that referenced this issue Jun 5, 2024
#34 - return empty json when bufferString is empty / update dependencies
@AlvaroVasconcelos
Copy link
Contributor

@fgonga ?

@fgonga
Copy link
Author

fgonga commented Jun 8, 2024

Acabei trocando de lib, porem a api retornava sim alguma coisa.

Vou voltar a testar quando refatorar o projecto.

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

3 participants