Closed whywaita closed 12 months ago
Hi @whywaita, thanks for taking the time to send this suggestion!
Indeed, our Web API documents mention a recommended HTTP method to use for an API call. However, in reality, all the Slack API endpoints can be accessed with the HTTP POST method, and that's why this SDK consistently uses it for all the APIs (also, this is the same for other existing SDKs such as Node.js, Python, and Java ones). Not following the recommended HTTP methods in documents can reduce this team's maintenance efforts, thus we don't have plans to change this in the short term.
Thanks again for your time and interest, and we apologize for the confusion with the API documents! Let me close this issue now.
hum I see, I will wait for all APIs to become using POST.
There's more information on this on our HTTP API Overview documentation. We opt to use the "POST bodies" approach as it reduces the amount of code we require to maintain and there is support for it for all API methods (as far as I know).
Description
Now,
apiCall()
only supports POST method.https://github.com/slackapi/deno-slack-api/blob/368e4064f836b222178cfc7722d377d46baea118/src/base-client.ts#L42
But Slack API has other HTTP methods. So
apiCall
needs to support other HTTP methods.Suggestion
apiCallWithHTTPMethods()
apiPostCall()
,apiGetCall()
,apiDeleteCall()
and moreRequirements (place an
x
in each of the[ ]
)