Use a : character followed by the custom verb in HTTP URL

Following the recommendation from google.aip.dev/136
This commit is contained in:
Ken Hibino
2020-12-07 06:41:16 -08:00
parent ef0ff2512b
commit 1ffe9f75f5
2 changed files with 7 additions and 6 deletions

View File

@@ -144,14 +144,14 @@ export async function deleteQueue(qname: string): Promise<void> {
export async function pauseQueue(qname: string): Promise<void> {
await axios({
method: "post",
url: `${BASE_URL}/queues/${qname}/pause`,
url: `${BASE_URL}/queues/${qname}:pause`,
});
}
export async function resumeQueue(qname: string): Promise<void> {
await axios({
method: "post",
url: `${BASE_URL}/queues/${qname}/resume`,
url: `${BASE_URL}/queues/${qname}:resume`,
});
}
@@ -176,7 +176,7 @@ export async function cancelActiveTask(
): Promise<void> {
await axios({
method: "post",
url: `${BASE_URL}/queues/${qname}/active_tasks/${taskId}/cancel`,
url: `${BASE_URL}/queues/${qname}/active_tasks/${taskId}:cancel`,
});
}