diff --git a/types/got/got-tests.ts b/types/got/got-tests.ts index d3c0db19aa..9bb1b75d81 100644 --- a/types/got/got-tests.ts +++ b/types/got/got-tests.ts @@ -306,7 +306,7 @@ got('http://todomvc.com', { retry: 2 }); got('http://todomvc.com', { retry: { retries: 2, - methods: ['GET'], + methods: ['GET', 'POST'], statusCodes: [408, 504], maxRetryAfter: 1, errorCodes: ['ETIMEDOUT'] diff --git a/types/got/index.d.ts b/types/got/index.d.ts index 6d070fcadd..20909101ca 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -5,6 +5,7 @@ // Konstantin Ikonnikov // Stijn Van Nieuwenhuyse // Matthew Bull +// Ryan Wilson-Perkin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -251,7 +252,7 @@ declare namespace got { interface RetryOptions { retries?: number | RetryFunction; - methods?: Array<'GET' | 'PUT' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE'>; + methods?: Array<'GET' | 'POST' | 'PUT' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE'>; statusCodes?: Array<408 | 413 | 429 | 500 | 502 | 503 | 504>; maxRetryAfter?: number; /**