does the bp.http.post work from the workflow card.
# 🤝help
w
I’m trying to send variables from my chatbot to my Django application. But everytime I do it says error occurred. The first time I tried using the axioms library in the botpress card the second time I tried bp client.
here is the error Error Occured Error Occured Executed Post data to contracts API with specified contract details. in 49ms
f
Could you share a screenshot of the code? And have you tried doing it from something like PostMan or Insomnia
w
Sure, postman works fine. It's just botpress
f
Have you tried doing it from the webchat not just the emulator?
w
No I'll try that
Yeah it doesnt work
f
Can you send a screenshot of the code?
w
here you go
f
Why are you using bp.http.post?
w
isn't it the default bp client?
is there any other way?
Execute code "Send data to Django API endpoint and log response." An error occurred while executing the code: {}
I'm guessing you can't import axios directly into the workflow right?
f
Axios has already been imported
w
but then axios is linted red here
f
That is because you don't need that
It comes standard with the execute code card
w
Ohh
f
Delete line 1
w
Ok wait let me try this
Oh wow it worked perfectly
crazy how much time it took me to debug when it was just one line of code💀
Thanks a lot man really appreciate it
f
You are very welcome