Skip to content

IGitApi.getBlobsZip Fails. Sends GET request instead of POST #615

Closed
@cjh15hub

Description

@cjh15hub

Environment

Node version: v18.20.4
Npm version: 10.7.0
OS and version: Windows 11
azure-devops-node-api version: 7.0.0

Issue Description

Duplicate of unresolved, stale issue 362

IGitAPI.getBlobsZip should send a POST request according to Rest API documentation (https://docs.microsoft.com/en-us/rest/api/azure/devops/git/blobs/get%20blobs%20zip) but sends GET request instead:

azure-devops-node-api/api/GitApi.ts

Expected behavior

IGitAPI.getBlobsZip should return a Promise<NodeJS.ReadableStream> transferring the requested zip.

Actual behavior

The returned data is: "{"count":1,"value":{"Message":"The requested resource does not support http method 'GET'."}}"

Steps to reproduce

  1. Instantiate a connection to the IGitAPI
    const gitAPI = await connection.getGitApi();
  2. Request ZIP file
    gitAPI.getBlobsZip(blobdIds, repositoryId, projectId);
  3. Stream response to log.txt
  4. Check content of log.txt

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions