httpie
httpie copied to clipboard
Cannot find module 'url'
Hi,
When I add httpie to an angular project I get the following error:
Error: node_modules/httpie/index.d.ts:1:21 - error TS2307: Cannot find module 'url' or its corresponding type declarations.
1 import { Url } from 'url';
As a workaround, I just removed the 'import' statement and the 'Url' references and it seems to work fine.
export function send<T = any>(method: string, uri: string | URL, opts?: Partial<Options>): Promise<Response<T>>;
declare function method<T = any>(uri: string | URL, opts?: Partial<Options>): Promise<Response<T>>;
If it really doesn't break anything, maybe this patch can be pushed to the repository.