How to make webview download file when I clicked a download link inside

Hi i am creating a webview using appgyver. Inside my webview, I would have a link to pdf download, When i click some link inside my webview, I wanted it to automatically download. Is there any way to make it possible?