I am facing an issue where I've set up a class extending MediaLibraryService and am trying to play HTTP music from a SubSonic URL. The issue is that SubSonic uses GET method to accept the request or else it returns a response code 301 MOVED PERMANENTLY.
Below is the error for more context:
Playback error: androidx.media3.exoplayer.ExoPlaybackException: Source error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:701)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:673)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.datasource.HttpDataSource$InvalidResponseCodeException: Response code: 301
at androidx.media3.datasource.DefaultHttpDataSource.open(DefaultHttpDataSource.java:436)
at androidx.media3.datasource.ResolvingDataSource.open(ResolvingDataSource.java:110)
at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86)
at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1029)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:417)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Here is the caught error:
androidx.media3.datasource.HttpDataSource$InvalidResponseCodeException: Response code: 301
My question is how can I make it so the request to get the data is always GET?