Package jenkins
Class UserAgentURLConnectionDecorator
- java.lang.Object
-
- hudson.URLConnectionDecorator
-
- jenkins.UserAgentURLConnectionDecorator
-
- All Implemented Interfaces:
ExtensionPoint
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Symbol("userAgent") public class UserAgentURLConnectionDecorator extends URLConnectionDecorator
Sets a Jenkins specific user-agent HTTP header forHttpURLConnection
.- Since:
- 2.286
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DISABLED
-
Constructor Summary
Constructors Constructor Description UserAgentURLConnectionDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decorate(URLConnection con)
Called before it gets connected.static String
getUserAgent()
-
Methods inherited from class hudson.URLConnectionDecorator
all
-
-
-
-
Method Detail
-
decorate
public void decorate(URLConnection con) throws IOException
Description copied from class:URLConnectionDecorator
Called before it gets connected. Can be used to tweak parameters.- Specified by:
decorate
in classURLConnectionDecorator
- Throws:
IOException
-
getUserAgent
public static String getUserAgent()
-
-