I can try on swagger or postman, that is working but i cannot send request in flutter. This is the output of Postman =>
--header 'Content-Type: application/json' \
--data-raw '"12312412543412"'
This is my code api part in flutter =>
Future loginComplete(id, token) async {
final response = await dio.post('${wp.LoginCompletePage}userId=$id',
data: "$token",
options: Options(headers: {
HttpHeaders.contentTypeHeader:"application/json",
HttpHeaders.acceptHeader:"*/*"
}));
debugPrint(response.toString());
if(response.statusCode != 200) {
debugPrint(response.statusCode.toString());
}
return response;
Could anyone help me?