DEV Community

Kelvin Wangonya
Kelvin Wangonya

Posted on

5 1

Progress: sending messages and being notified when people join the channel

As I noted last time, I was having a bit of a problem with sending messages:

Apparently, messages sent from the python twilio client don't activate the webhook so I have to do a direct POST request to the API. Doing that returns an empty response for some reason so I'm not yet able to send messages from the terminal. But I'll figure it out.

After doing some digging, I found out that the Content-Type has to be application/x-www-form-urlencoded. I was using the default application/json. I must say though, it's a bit weird that instead of returning an error that the content type was wrong, it just created an empty message thus returning a blank response in body.

Anyway, now that I've fixed that, I'm able to send and receive messages, and be notified when others join the channel.

Alt Text

My user (newtestguy) is logged in on the terminal app on the right. Two other users are using the browser app on the left. Messages are send and received successfully across both platforms.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (1)

Collapse
 
bernardbaker profile image
Bernard Baker β€’

Hi, you've made such good progress 🌞 keep going πŸš€

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay