[YouTube] Make client and origin HTTP headers methods package-private

This allows their internal usage in an upcoming new class to be used on
other InnerTube clients than the WEB one.
This commit is contained in:
AudricV 2025-01-28 21:07:37 +01:00 committed by Stypox
parent 3691fc22c6
commit 1df0267440
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -1387,7 +1387,7 @@ public final class YoutubeParsingHelper {
* *
* @param url The URL to be set as the origin and referrer. * @param url The URL to be set as the origin and referrer.
*/ */
private static Map<String, List<String>> getOriginReferrerHeaders(@Nonnull final String url) { static Map<String, List<String>> getOriginReferrerHeaders(@Nonnull final String url) {
final var urlList = List.of(url); final var urlList = List.of(url);
return Map.of("Origin", urlList, "Referer", urlList); return Map.of("Origin", urlList, "Referer", urlList);
} }
@ -1399,7 +1399,7 @@ public final class YoutubeParsingHelper {
* @param name The X-YouTube-Client-Name value. * @param name The X-YouTube-Client-Name value.
* @param version X-YouTube-Client-Version value. * @param version X-YouTube-Client-Version value.
*/ */
private static Map<String, List<String>> getClientHeaders(@Nonnull final String name, static Map<String, List<String>> getClientHeaders(@Nonnull final String name,
@Nonnull final String version) { @Nonnull final String version) {
return Map.of("X-YouTube-Client-Name", List.of(name), return Map.of("X-YouTube-Client-Name", List.of(name),
"X-YouTube-Client-Version", List.of(version)); "X-YouTube-Client-Version", List.of(version));