﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12231	Uniform access to HTTP resources	simon04	simon04	"(This is meant as a broader follow-up of #12220.)

Currently, we have various ways to access HTTP resources. Especially, currently we have 3 implementations to follow HTTP redirects, which do not cover all possible HTTP calls.

{{{#!java
src/org/openstreetmap/josm/tools/Utils.java
943:                    connection = openHttpConnection(new URL(connection.getHeaderField(""Location"")), keepAlive);

src/org/openstreetmap/josm/tools/HttpClient.java
85:                final String redirectLocation = connection.getHeaderField(""Location"");

src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
327:                    urlConn = getURLConnection(new URL(urlConn.getHeaderField(""Location"")));
486:                urlConn = getURLConnection(new URL(urlConn.getHeaderField(""Location"")));
}}}

Despite having some utility functions, many classes perform operations directly on `HttpURLConnection`s.

Inspired by https://github.com/google/google-http-java-client and our very handy `ImageProvider`, I implemented a `HttpClient` class.

My final goal is to replace all `Utils.openURL*` and `HttpURLConnection` usages with this new class."	enhancement	closed	normal	15.12	Core		fixed	http compression urlconnection	
