Inumedia / SlackAPI

.NET Implementation of the Slack team communication platform API.
MIT License
452 stars 243 forks source link

Attachment.Text can cause request URI to be > 65535 characters #238

Open jsblock78 opened 4 years ago

jsblock78 commented 4 years ago

If PostMessageAsync() is called passing attachment whose text is large, the call will fail due to:

System.AggregateException: One or more errors occurred. (Invalid URI: The Uri string is too long.)

---> System.UriFormatException: Invalid URI: The Uri string is too long.

at System.UriHelper.EscapeString(String input, Int32 start, Int32 end, Char[] dest, Int32& destPos, Boolean isUriString, Char force1, Char force2, Char rsvd)

at System.Uri.EscapeDataString(String stringToEscape)

at SlackAPI.RequestStateForTask`1.ExecutePost()

Why is this data not passed in the body of the request?