-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Invoke-RestMethod does not count on Content-Type
field. Broken compared to PS 5.0.
#2245
Comments
Content-Type
fieldContent-Type
field. Broken compared to PS 5.0.
Content-Type
field. Broken compared to PS 5.0.Content-Type
field. Broken compared to PS 5.0.
Exactrly same for me |
I have similar issues talking to an XML api. I've tried with -ContentType "application/xml" and with Content-Type set in the request header with same result in both cases. The exception I get is :
Note - Interesting that JsonReader is involved in parsing an xml response?
|
We are seeing a similar issue (Logged here: jakkulabs/PowervRA#97). The response content type is text/yaml but you can clearly see it's trying to use Newtonsofts Json library. |
looks like it was fixed by #2862 |
@2xmax: Thanks! Looks like the original issues were fixed already :) |
Excellent - thanks @2xmax ! We have been able to close one of our issues being able to support PowerShell Core thanks to your fix: jakkulabs/PowervRA#97 |
Steps to reproduce
Expected behavior
Return content. Or at least behave the same as in PowerShell 5.0.
Actual behavior
Invoke-RestMethod : Unexpected character encountered while parsing value: U. Path '', line 0, position 0.
At line:1 char:1
Environment data
powershell 6.0.0-alpha.9-1
The text was updated successfully, but these errors were encountered: