uploadComment method
Implementation
Future<http.Response> uploadComment({
required int? userId,
required int? postId,
required String comment,
}) {
var data = json.encode({
"user": userId,
"post": postId,
"comment": comment,
});
log(data);
return post(Uri.parse('$apiURL/post-comments/create'),
headers: {
"token":
"cnejwi8c9wehnd8fchni2x239jxexnjx2n23i8xn3oifr0cwd32fjnrf453vreve",
"content-type": 'application/json',
},
body: data);
}