Repository: ccxt/ccxt
File: cs/ccxt/base/Exchange.cs (C#)

Code before:
        var codeInHttpExceptions = safeValue(this.httpExceptions, codeString);
        if (codeInHttpExceptions != null)
        {
            var errorMessage = this.id + ' ' + method + ' ' + url + ' ' + codeString + ' ' + reason + ' ' + body;
            var Exception = NewException(codeInHttpExceptions as Type, errorMessage);
            throw Exception;
        }
    }

    public async virtual Task<object> fetch(object url2, object method2 = null, object headers2 = null, object body2 = null)
    {

        if (fetchResponse != null)
        {
            return fetchResponse;
        }

        var url = url2 as String;
        var method = method2 as String;
        var headers3 = headers2 as dict;
        var headers = this.extend(this.headers, headers3) as dict;
        var body = body2 as String;

        var proxyUrl = this.checkProxyUrlSettings (url, method, headers, body);
        if (proxyUrl != null) {
            proxyUrl = proxyUrl.ToString();
            url = this.proxyUrlEncoderCallback (proxyUrl, url).ToString();
        }

        if (this.verbose)
            this.log("fetch Request:\n" + this.id + " " + method + " " + url + "\nRequestHeaders:\n" + this.stringifyObject(headers) + "\nRequestBody:\n" + this.json(body) + "\n");

        // to do: add all proxies support
        this.checkProxySettings();
        // add headers
        // httpClient.DefaultRequestHeaders.Accept.Clear();
        // httpClient.DefaultRequestHeaders.Clear();
        var headersList = new List<string>(headers.Keys);

        var contentType = "";
        // foreach (string key in headersList)
        // {

        //     if (key.ToLower() != "content-type")
        //     {
        //         httpClient.DefaultRequestHeaders.Add(key, headers[key].ToString());
        //     }
        //     else
        //     {
        //         // can't set content type header here, because it's part of the content
        //         // check: https://nzpcmad.blogspot.com/2017/07/aspnet-misused-header-name-make-sure.html

Review comment (suggestion):
it shouldn't be called `Callback` callback means a different thing, more like when you call it back after an action

Code after:
        var codeInHttpExceptions = safeValue(this.httpExceptions, codeString);
        if (codeInHttpExceptions != null)
        {
            var errorMessage = this.id + ' ' + method + ' ' + url + ' ' + codeString + ' ' + reason + ' ' + body;
            var Exception = NewException(codeInHttpExceptions as Type, errorMessage);
            throw Exception;
        }
    }

    public async virtual Task<object> fetch(object url2, object method2 = null, object headers2 = null, object body2 = null)
    {

        if (fetchResponse != null)
        {
            return fetchResponse;
        }

        var url = url2 as String;
        var method = method2 as String;
        var headers3 = headers2 as dict;
        var headers = this.extend(this.headers, headers3) as dict;
        var body = body2 as String;

        var proxyUrl = this.checkProxyUrlSettings (url, method, headers, body);
        if (proxyUrl != null) {
            proxyUrl = proxyUrl.ToString();
            url = proxyUrl + this.urlEncoderForProxyUrl (url).ToString();
        }

        if (this.verbose)
            this.log("fetch Request:\n" + this.id + " " + method + " " + url + "\nRequestHeaders:\n" + this.stringifyObject(headers) + "\nRequestBody:\n" + this.json(body) + "\n");

        // to do: add all proxies support
        this.checkProxySettings();
        // add headers
        // httpClient.DefaultRequestHeaders.Accept.Clear();
        // httpClient.DefaultRequestHeaders.Clear();
        var headersList = new List<string>(headers.Keys);

        var contentType = "";
        // foreach (string key in headersList)
        // {

        //     if (key.ToLower() != "content-type")
        //     {
        //         httpClient.DefaultRequestHeaders.Add(key, headers[key].ToString());
        //     }
        //     else
        //     {
        //         // can't set content type header here, because it's part of the content
        //         // check: https://nzpcmad.blogspot.com/2017/07/aspnet-misused-header-name-make-sure.html