           Accept: 'application/json'
         }
       }
+      ask_options.path = path + ask_options.path if path?
 
       ask_res ->
         data = ''

username = process.env.HUBOT_YOUTRACK_USERNAME
password = process.env.HUBOT_YOUTRACK_PASSWORD

base_pattern = ///
^(http[s]?://) # scheme
(\w+)          # username
:
(.[^@]+)       # password
@
(.[^/]+)       # hostname and port
(/.+)?         # base path
///

if yt_url?
  url_parts = yt_url.match(base_pattern)
  scheme = url_parts[1]
  username = url_parts[2]
  password = url_parts[3]
  host = url_parts[4]
  path = url_parts[5] if url_parts[5]?
else
  scheme = 'http://'


# Author:
#   Dusty Burwell, Jeremy Sellars and Jens Jahnke

URL = require "url"

http = require 'http'
https = require 'https'

