How To handle "String literal size exceeds compiler limit" in gatling script


we are trying to build TCIL request in which we will be sending the formatted EDIFACT messages.
one of the request has very long message to be sent and it throws error “String literal size exceeds compiler limit” when we insert the string


       .message(StringBody("string to be sent"))

so could you please help to resolve this issue.

Move it into a file:

.message(RawFileBody("file to be sent"))


.message(ElFileBody("file to be sent"))

see Gatling - HTTP Request