Skip to content

Conversation

@jaboc83
Copy link

@jaboc83 jaboc83 commented Oct 2, 2019

This change allows the user to configure the message content-type with an optional parameter or using the PSSlackConfig as requested in the linked issue.

The content type default was previously set to
application/x-www-form-urlencoded by
default. This change allows the user to configure the contenttype via
parameter in Send-SlackMessage or via the PSSlackConfig options.

By default if neither are specified, the fallback is
text/plain; charset=utf-8.
@RamblingCookieMonster
Copy link
Owner

Oy, great idea, and completely missed this PR!

Will check this out in the next day or two.

I... don't know enough to answer this, but will switching to use utf-8 by default potentially break anything for folks out there? I might tweak this to initialize that config value as $null, and only set the parameter on invoke-restmethod if the config (or function param) specifies. It's late though and I may not be thinking clearly : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants