Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cannot set charset-utf8 ContentType on Invoke-Restmethod POST #3226

Copy link
Copy link
@gheorghiuradu

Description

@gheorghiuradu
Issue body actions

Steps to reproduce

Run command Invoke-RestMethod [URI] -Mehtod POST -ContentType 'application/json; charset=utf-8' -Body $body

Expected behavior

The command executes successfully

Actual behavior

Command fails with error:
Invoke-RestMethod : The format of value 'application/json; charset=utf-8' is
invalid.

If the contentype is set to 'application/json' only it works, but setting charset should be allowed, as it used to work on previous versions no problem.
Environment data

Ubuntu 16.04

> $PSVersionTable
Name                           Value                                           
----                           -----                                           
PSVersion                      6.0.0-alpha                                     
PSEdition                      Core                                            
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
BuildVersion                   3.0.0.0                                         
GitCommitId                    v6.0.0-alpha.15                                 
CLRVersion                                                                     
WSManStackVersion              3.0                                             
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1   
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.