Skip to content

Instantly share code, notes, and snippets.

@jechlin
Created July 2, 2013 20:04
Show Gist options
  • Save jechlin/5912628 to your computer and use it in GitHub Desktop.
Save jechlin/5912628 to your computer and use it in GitHub Desktop.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.properties.APKeys
import org.apache.commons.httpclient.HttpClient
import org.apache.commons.httpclient.HttpMethod
import org.apache.commons.httpclient.methods.GetMethod
def client = new HttpClient()
def baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)
HttpMethod method = new GetMethod("${baseUrl}/login.jsp")
def httpStatus = client.executeMethod(method)
"Request returned ${httpStatus}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment