Skip to content

Invoke-WebRequest if no -ContentType check -Headers @{Content-Type=...} #9851

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

Closed
2 tasks done
CarloToso opened this issue Mar 1, 2023 · 0 comments · Fixed by #9903
Closed
2 tasks done

Invoke-WebRequest if no -ContentType check -Headers @{Content-Type=...} #9851

CarloToso opened this issue Mar 1, 2023 · 0 comments · Fixed by #9903
Assignees
Labels
area-utility Area - Microsoft.PowerShell.Utility module issue-doc-idea Issue - request for new content
Milestone

Comments

@CarloToso
Copy link

CarloToso commented Mar 1, 2023

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

  • Currently we only check for -ContentType and we ignore -Headers @{Content-Type=...} after this PR we also check for ContentType in headers

  • If we set both -ContentType and -Headers @{Content-Type=...} --> -ContentType is used

Content-Type is used to encode the body

Details

No response

Articles

Related Source Pull Requests

Related Source Issues

@CarloToso CarloToso added issue-doc-idea Issue - request for new content needs-triage Waiting - Needs triage labels Mar 1, 2023
@sdwheeler sdwheeler added area-utility Area - Microsoft.PowerShell.Utility module hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release and removed needs-triage Waiting - Needs triage labels Mar 1, 2023
@michaeltlombardi michaeltlombardi removed the hold-for-pr Waiting - for PR merge label Mar 2, 2023
@michaeltlombardi michaeltlombardi self-assigned this Mar 14, 2023
michaeltlombardi added a commit to michaeltlombardi/PowerShell-Docs that referenced this issue Mar 14, 2023
This change documents the updated behavior for preferring the value of
the **ContentType** parameter when the `Content-Type` header is defined
in the value of the **Headers** parameter.

- Fixes AB#70154
- Resolves MicrosoftDocs#9851
@sdwheeler sdwheeler added this to the 7.4 milestone Mar 14, 2023
@sdwheeler sdwheeler removed the hold-for-release Waiting - for next release label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-utility Area - Microsoft.PowerShell.Utility module issue-doc-idea Issue - request for new content
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants