I am testing to call RASA API by using Flutter. When I get the response with link inside (Like the default image when we call mood_unhappy intent), the link is displayed with the backslash before the original slash like this:
[
{"recipient_id":"user","text":"Here is something to cheer you up:"},
{"recipient_id":"user","image":"https:\/\/i.imgur.com\/nGF1K8f.jpg"},
{"recipient_id":"user","text":"Did that help you?"}
]
I also test the API on POSTMAN and it still working fine
[
{
"recipient_id": "test_user",
"text": "Here is something to cheer you up:"
},
{
"recipient_id": "test_user",
"image": "https://i.imgur.com/nGF1K8f.jpg"
},
{
"recipient_id": "test_user",
"text": "Did that help you?"
}
]
This is my Flutter code to call the API
void postMessage(message) async {
final uri = Uri.parse("http://localhost:5005/webhooks/rest/webhook");
final response = await http.post(
uri,
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode(message),
);
debugPrint(response.body);
}
Is there any way to make the link displayed as usual like in Postman? Is that the Flutter’s Problem or Rasa’s problem? I am taking doubt about Flutter’s problem but I cannot find any solution about this.
Edit: I have tested another API on Flutter and the link still appear in usual way. So, the problem seem came from Rasa.