# Using templates to send messages via WebSockets

**URL:** <https://community.gatling.io/t/using-templates-to-send-messages-via-websockets/4602>\
**Category:** Gatling (Open-Source)\
**Created:** [October 25, 2018, 5:42am UTC](https://community.gatling.io/t/using-templates-to-send-messages-via-websockets/4602 "2018-10-25T05:42:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Mezhov](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Alexander\_Mezhov](https://community.gatling.io/u/Alexander_Mezhov)\
**Post date:** [October 25, 2018, 5:42am UTC](https://community.gatling.io/t/using-templates-to-send-messages-via-websockets/4602/1 "2018-10-25T05:42:31Z")

</div>

Hello!

Is there any way to do something like this?

> ws(“Send Some Message”)
> 
> .sendText(ElFileBody(“SomeMessage.json”))

Thank you

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [October 25, 2018, 5:55am UTC](https://community.gatling.io/t/using-templates-to-send-messages-via-websockets/4602/2 "2018-10-25T05:55:48Z")

</div>

Hello,

No, no file based templates atm, as sendText doesn’t take a Body.  
This change might make sense, but sadly, we’ve just release Gatling 3.0 stable after several weeks of release candidates. We could have changed that if you had chimed in sooner ☹

Regards,

---

<div class="post-metadata">

**Author:** ![Alexander\_Mezhov](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Alexander\_Mezhov](https://community.gatling.io/u/Alexander_Mezhov)\
**Post date:** [October 25, 2018, 6:03am UTC](https://community.gatling.io/t/using-templates-to-send-messages-via-websockets/4602/3 "2018-10-25T06:03:52Z")

</div>

Ok, thank you. But it will be great to see this feature in the future. Should I post a request on GitHub?
