algorand / algorand/js-algorand-sdk

POST and DELETE requests always assume the response is JSON

未關閉
#751 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Team Lamprey
主要語言
TypeScript
星號
297
分支
214
平均合併
1 小時 3 分鐘
30 天內合併 PR
3

描述

## Problem

Our [POST](https://github.com/algorand/js-algorand-sdk/blob/0039284f1ecf77b609acab9da3df1e62679f8531/src/client/client.ts#L256) and [DELETE](https://github.com/algorand/js-algorand-sdk/blob/0039284f1ecf77b609acab9da3df1e62679f8531/src/client/client.ts#L287) request implementations always assume the response is JSON.

More context here: https://github.com/algorand/js-algorand-sdk/pull/749#discussion_r1143845809

## Solution

We should improve these handlers to behave like [GET](https://github.com/algorand/js-algorand-sdk/blob/0039284f1ecf77b609acab9da3df1e62679f8531/src/client/client.ts#L228), which figures out the response format based on the query parameters for the call, using `getAcceptFormat(query)`.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。