Bird
0
0

What is the default HTTP method used by Invoke-RestMethod if no method is specified?

easy📝 Conceptual Q1 of 15
PowerShell - Cross-Platform PowerShell
What is the default HTTP method used by Invoke-RestMethod if no method is specified?
AGET
BPOST
CPUT
DDELETE
Step-by-Step Solution
Solution:
  1. Step 1: Understand default behavior of Invoke-RestMethod

    When no HTTP method is specified, Invoke-RestMethod sends a GET request by default.
  2. Step 2: Confirm default method

    GET is the standard method to retrieve data, which matches the default behavior of Invoke-RestMethod.
  3. Final Answer:

    GET -> Option A
  4. Quick Check:

    Default HTTP method = GET [OK]
Quick Trick: Invoke-RestMethod defaults to GET if no method given [OK]
Common Mistakes:
  • Assuming POST is default
  • Forgetting to specify method
  • Confusing with Invoke-WebRequest

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes