Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#85 Add configuration for ContentType #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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