I want to allow file download in Webview

I connect to a site through the application with a web view. When I click the download button here, I want to download pdf. When I open this page with a normal browser, I can download pdf. If I want to download from the application via webview, the application closes. How can I do it