Add Accept header fetching JSON

This commit is contained in:
Grahame Grieve 2022-12-09 20:09:12 +11:00
parent 474f84c903
commit 7c2c44b333
1 changed files with 1 additions and 0 deletions

View File

@ -653,6 +653,7 @@ public class JsonParser {
private static byte[] fetch(String source) throws IOException {
SimpleHTTPClient fetcher = new SimpleHTTPClient();
fetcher.addHeader("Accept", "application/json, application/fhir+json");
HTTPResult res = fetcher.get(source+"?nocache=" + System.currentTimeMillis());
res.checkThrowException();
return res.getContent();