Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Mar 18, 2024
1 parent 6b208cf commit a65de67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http_client/fetch_ic/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ async function callHttpRequest(
): Promise<CallHttpRequestResult> {
const method = init?.method ?? 'GET';

getHeadBodyCheck(method, body);
checkGetHeadBody(method, body);

return await actor.http_request({
method,
Expand All @@ -219,7 +219,7 @@ async function callHttpRequestUpdate(
): Promise<CallHttpRequestUpdateResult> {
const method = init?.method ?? 'GET';

getHeadBodyCheck(method, body);
checkGetHeadBody(method, body);

return await actor.http_request_update({
method,
Expand All @@ -237,7 +237,7 @@ async function callHttpRequestUpdate(
});
}

function getHeadBodyCheck(method: string, body: Uint8Array) {
function checkGetHeadBody(method: string, body: Uint8Array) {
if (
(method.toLowerCase() === 'get' || method.toLowerCase() === 'head') &&
body.length !== 0
Expand Down

0 comments on commit a65de67

Please sign in to comment.