Download a JSON file from a url then store to local storage

good day! I have an app and I need to download a JSON file from a url and then create a folder in my local storage then store the file there so that my app can read it even if it’s offline. I’ve read posts about file transfer but I just don’t get it. Will anyone please help me with the codes and some explanation about them?