public HipChatConnection(HipChatConnectionSettings settings, HipChatContext context) { _connectionSettings = settings; _webRequest = CreateWebRequest(_connectionSettings, context); }
private HttpWebRequest CreateWebRequest(HipChatConnectionSettings settings, HipChatContext context) { var apiCallUrl = new Uri(new Uri(settings.BaseApiUrl), UrlHelper.GetActionUrl(context.Action) + context.BuildQueryString()); var webRequest = _webRequest = (HttpWebRequest)Create(apiCallUrl); webRequest.Method = UrlHelper.GetActionMethod(context.Action); return (webRequest); }