示例#1
0
        /// <summary>
        /// Sets a specific header for a specific service.
        /// </summary>
        /// <param name="service">The name of the service to update the headers for.</param>
        /// <param name="endpoint">The name of the endpoint to update the headers for.</param>
        /// <param name="key">The key of the header.</param>
        /// <param name="value">The value of the header.</param>
        public void Set(string service, string endpoint, string key, string value)
        {
            if (!_serviceHeaders.ContainsKey(service))
            {
                _serviceHeaders[service] = new HttpServiceHeaders(service);
            }

            _serviceHeaders[service].Set(endpoint, key, value);
        }
示例#2
0
        /// <summary>
        /// Sets a specific header for a specific service.
        /// </summary>
        /// <param name="service">The name of the service to update the headers for.</param>
        /// <param name="key">The key of the header.</param>
        /// <param name="value">The value of the header.</param>
        public void Set(string service, string key, string value)
        {
            if (!_serviceHeaders.ContainsKey(service))
            {
                _serviceHeaders[service] = new HttpServiceHeaders(service);
            }

            _serviceHeaders[service].Headers[key] = value;
        }