download: reworked connection:

- added shareable code with default proxy, headers and other settings for download tasks like images, symbols, mtgjson, etc;
- use XmageURLConnection.downloadText for text resources
- use XmageURLConnection.downloadBinary for any file resources
- added user agent with app version for all requests;
- added http logs and improved error messages;
This commit is contained in:
Oleg Agafonov 2024-07-31 16:24:59 +04:00
parent fad63389d0
commit e1cffbde40
35 changed files with 713 additions and 464 deletions

View file

@ -1,9 +1,15 @@
package mage.verify.mtgjson;
/**
* MTGJSON v5: metadata class
* <p>
* Contains version info
* <p>
* API docs <a href="https://mtgjson.com/file-models/meta/">here</a>
*
* @author JayDi85
*/
public final class MtgJsonMetadata {
// MTGJSON metadata
// https://mtgjson.com/file-models/meta/
public String date;
public String version;
}