Want to add a body to my delete http request in flutter? Use the below example code to add a body to my delete http request in flutter.
1 2 3 4 5 6 7 8 9 10 | final client = http.Client(); try { final response = await client.send( http.Request("DELETE", Uri.parse("${config.basicUrl}removeFavorite")) ..headers["authorization"] = "Bearer $bearer" ..body = "..."); // } finally { client.close(); } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.