http api/service: map .js to application/json and use in http clients

This is to trick the CDN into caching responses
This commit is contained in:
Adam
2018-10-29 14:44:32 -04:00
parent 96676b6387
commit 47cf5e543f
4 changed files with 48 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ public class FeedClient
public FeedResult lookupFeed() throws IOException
{
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("feed")
.addPathSegment("feed.js")
.build();
logger.debug("Built URI: {}", url);

View File

@@ -174,7 +174,7 @@ public class ItemClient
{
HttpUrl.Builder urlBuilder = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("item")
.addPathSegment("prices");
.addPathSegment("prices.js");
HttpUrl url = urlBuilder.build();

View File

@@ -44,7 +44,7 @@ public class WorldClient
public WorldResult lookupWorlds() throws IOException
{
HttpUrl url = RuneLiteAPI.getApiBase().newBuilder()
.addPathSegment("worlds")
.addPathSegment("worlds.js")
.build();
logger.debug("Built URI: {}", url);