GoCoinAPI.Client.get_current_url C# (CSharp) Method

get_current_url() public method

public get_current_url ( ) : string
return string
    public string  get_current_url() {
        string current_url = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority +
    HttpContext.Current.Request.ApplicationPath.TrimEnd('/') + "/";
      
        if (HttpContext.Current.Request.ServerVariables["HTTPS"] == "on" || HttpContext.Current.Request.IsSecureConnection)
        {
            current_url = "https://" + current_url;
        }
        //else
        //{
        //    current_url = "http://" + current_url;
        //}
        return current_url;
    }

Usage Example

コード例 #1
0
ファイル: Auth.cs プロジェクト: shahdat45ict/gocoin-.net
    /**
    * Return Authorization url to get auth_code 
    *
    * @return string 
    */

    public string  get_auth_url() {  
        _client  = new Client();
        string url = _client.get_dashboard_url() + "/auth";
        var param = new { response_type = "code", client_id =_client.client_id , redirect_uri = _client.get_current_url(),scope=_client.scope };
        url = _client.create_get_url(url, param);
        return url;
    }
All Usage Examples Of GoCoinAPI.Client::get_current_url