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

-OutFile parameter description is incorrect with respect to v7.4+ behavior #10801

Closed
mklement0 opened this issue Jan 16, 2024 · 0 comments · Fixed by #10804
Closed

-OutFile parameter description is incorrect with respect to v7.4+ behavior #10801

mklement0 opened this issue Jan 16, 2024 · 0 comments · Fixed by #10804
Assignees
Labels
area-utility Area - Microsoft.PowerShell.Utility module issue-doc-bug Issue - error in documentation

Comments

@mklement0
Copy link
Contributor

Type of issue

Missing information

Feedback

Note: The behavior applies equally to Invoke-RestMethod, whose -OutFile parameter description currently lacks the 7.4 note.

The topic currently states (emphasis added):

Starting in PowerShell 7.4, you can specify a folder path without the filename. When you do, the file's name is the taken from either the Content-Disposition of the response or the last segment of the resolved URI after any redirections. When you specify a folder path for OutFile, you can't use the Resume parameter.

The bolded part is incorrect, because this behavior hasn't been implemented yet (the last-segment behavior has).

The relevant, not-yet-merged PR is PowerShell/PowerShell#19385

Page URL

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.4&viewFallbackFrom=powershell-7

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Utility/Invoke-WebRequest.md

Author

@sdwheeler

Document Id

b2e7e015-35b9-897c-3581-ad982240c97c

@mklement0 mklement0 added the needs-triage Waiting - Needs triage label Jan 16, 2024
@sdwheeler sdwheeler added area-utility Area - Microsoft.PowerShell.Utility module and removed needs-triage Waiting - Needs triage labels Jan 17, 2024
@michaeltlombardi michaeltlombardi self-assigned this Jan 17, 2024
@michaeltlombardi michaeltlombardi added the issue-doc-bug Issue - error in documentation label Jan 17, 2024
michaeltlombardi added a commit to michaeltlombardi/PowerShell-Docs that referenced this issue Jan 17, 2024
Prior to this change, the documentation for the `-OutFile` parameter
of the `Invoke-WebRequest` cmdlet incorrectly mentioned retrieving
the filename from the Content-Disposition. This functionality isn't
implemented. Further, the `-OutFile` parameter for `Invoke-RestMethod`
is missing any version-specific note, even though the behavior is the
same.

This change:

- Fixes the wording for the `-OutFile` parameter in `Invoke-WebRequest`
  to remove the non-implemented detail.
- Adds a note to the documentation for `Invoke-RestMethod` about the
  automatic naming.
- Resolves MicrosoftDocs#10801
- Fixes AB#200725
sdwheeler pushed a commit that referenced this issue Jan 17, 2024
Prior to this change, the documentation for the `-OutFile` parameter
of the `Invoke-WebRequest` cmdlet incorrectly mentioned retrieving
the filename from the Content-Disposition. This functionality isn't
implemented. Further, the `-OutFile` parameter for `Invoke-RestMethod`
is missing any version-specific note, even though the behavior is the
same.

This change:

- Fixes the wording for the `-OutFile` parameter in `Invoke-WebRequest`
  to remove the non-implemented detail.
- Adds a note to the documentation for `Invoke-RestMethod` about the
  automatic naming.
- Resolves #10801
- Fixes AB#200725
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-bug Issue - error in documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants