<commit_before>package rpc

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"

	"chain/net/http/reqid"
)

const (
	HeaderBlockchainID = "X-Blockchain-ID"
)

// ErrWrongNetwork is returned when a peer's blockchain ID differs from
// the RPC client's blockchain ID.
var ErrWrongNetwork = errors.New("connected to a peer on a different network")

// A Client is a Chain RPC client. It performs RPCs over HTTP using JSON
// request and responses. A Client must be configured with a secret token
// to authenticate with other Cores on the network.
type Client struct {
	BaseURL      string
	Username     string
	BuildTag     string
	BlockchainID string
}

func (c Client) userAgent() string {<commit_msg>net/rpc: don't use deprecated "X-" prefix<commit_after>package rpc

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"

	"chain/net/http/reqid"
)

const (
	HeaderBlockchainID = "Blockchain-ID"
)

// ErrWrongNetwork is returned when a peer's blockchain ID differs from
// the RPC client's blockchain ID.
var ErrWrongNetwork = errors.New("connected to a peer on a different network")

// A Client is a Chain RPC client. It performs RPCs over HTTP using JSON
// request and responses. A Client must be configured with a secret token
// to authenticate with other Cores on the network.
type Client struct {
	BaseURL      string
	Username     string
	BuildTag     string
	BlockchainID string
}

func (c Client) userAgent() string {
{'fraction_non_alphanumeric': 0.0875668449197861, 'fraction_numerical': 0.0, 'mean_word_length': 3.663551401869159, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '294928', 'n_tokens_mistral': 485, 'n_tokens_neox': 465, 'n_words': 183}