| 73 | } |
| 74 | |
| 75 | HTTPResponse Get(const URLView url, const HashTable<String, String>& headers, const FilePathView filePath) |
| 76 | { |
| 77 | SIV3D_ENGINE(Network)->init(); |
| 78 | |
| 79 | BinaryWriter writer{ filePath }; |
| 80 | { |
| 81 | if (not writer) |
| 82 | { |
| 83 | return{}; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | if (auto result = Get(url, headers, static_cast<IWriter&>(writer))) |
| 88 | { |
| 89 | return result; |
| 90 | } |
| 91 | |
| 92 | writer.close(); |
| 93 | FileSystem::Remove(filePath); |
| 94 | return{}; |
| 95 | } |
| 96 | |
| 97 | HTTPResponse Get(const URLView url, const HashTable<String, String>& headers, MemoryWriter& writer) |
| 98 | { |
no test coverage detected