Skip to content

Automatically converts PSCustomObject and Hashtable to JSON string when passed as Body to Invoke-TfsRestApi #213

@igoravl

Description

@igoravl

Enhance the Invoke-TfsRestApi cmdlet by automatically converting PSCustomObject and Hashtable objects to a JSON string when passed as the body of the request, aligning its behavior with that of the Invoke-RestMethod.

Currently, when using Invoke-TfsRestApi to make calls to the Azure DevOps API, the automatic conversion of PSCustomObject and Hashtable objects to JSON format before being sent as the request body is not implemented. The caller is required to make a call to ConvertTo-Json (or equivalent) prior to calling Invoke-TfsRestApi.

Ensuring that Invoke-TfsRestApi behaves similarly to Invoke-RestMethod in this aspect is essential for consistency and user experience. Users expect seamless handling of data objects, and this proposed feature aims to meet those expectations.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions