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:
@@ -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);
|
||||
|
||||
@@ -174,7 +174,7 @@ public class ItemClient
|
||||
{
|
||||
HttpUrl.Builder urlBuilder = RuneLiteAPI.getApiBase().newBuilder()
|
||||
.addPathSegment("item")
|
||||
.addPathSegment("prices");
|
||||
.addPathSegment("prices.js");
|
||||
|
||||
HttpUrl url = urlBuilder.build();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user