### Get: Make a GET Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use Get to perform a simple GET request to a specified URL. It returns the HTTP response and any potential error. ```go func (c *PipelineClient) Get(url string) (*http.Response, error) ``` -------------------------------- ### Get Version String Representation Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client String returns a string representation of the HTTP version. ```go func (v *Version) String() string ``` -------------------------------- ### Raw HTTP Client Default Instance Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Provides a default HTTP client instance for making raw requests, pre-configured with DefaultOptions. This can be used for quick setup without explicit client initialization. ```go var DefaultClient = Client{ Options: DefaultOptions, // contains filtered or unexported fields } ``` -------------------------------- ### Make HTTP GET Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use Get to make a simple HTTP GET request to a specified URL. This is a convenient method for fetching resources. ```go func Get(url string) (*http.Response, error) ``` ```go func (c *Client) Get(url string) (*http.Response, error) ``` -------------------------------- ### Client.Get Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP GET request using the client. ```APIDOC ## Client.Get ### Description Performs an HTTP GET request to the specified URL using the client. ### Method Signature ```go func (c *Client) Get(url string) (*http.Response, error) ``` ``` -------------------------------- ### Get Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP GET request to the specified URL. ```APIDOC ## Get ### Description Performs an HTTP GET request to the specified URL. ### Function Signature ```go func Get(url string) (*http.Response, error) ``` ``` -------------------------------- ### PipelineClient.Get Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP GET request using the PipelineClient. ```APIDOC ## PipelineClient.Get ### Description Performs an HTTP GET request to the specified URL using the PipelineClient. ### Method Signature ```go func (c *PipelineClient) Get(url string) (*http.Response, error) ``` ``` -------------------------------- ### Get Status String Representation Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client String returns a string representation of the HTTP status code. ```go func (s Status) String() string ``` -------------------------------- ### Get First Pipe Connection Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Retrieves the first network connection from a pipe connection pair. This method is part of the PipeConns type. ```go func (pc *PipeConns) Conn1() net.Conn ``` -------------------------------- ### Get Request Body Content Length Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client ContentLength returns the length of the request body. Returns -1 if the length is unknown. ```go func (r *Request) ContentLength() int64 ``` -------------------------------- ### Get Response Body Content Length Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client ContentLength returns the length of the response body. Returns -1 if the length is unknown. ```go func (r *Response) ContentLength() int64 ``` -------------------------------- ### Get Pending Requests Count Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Returns the number of pending requests for the PipelineClient. This method is part of the PipelineClient type. ```go func (c *PipelineClient) PendingRequests() int ``` -------------------------------- ### Get Response Transfer Encoding Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client TransferEncoding returns the transfer encoding used for the message. Defaults to 'identity' if not specified. ```go func (r *Response) TransferEncoding() string ``` -------------------------------- ### Get Second Pipe Connection Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Retrieves the second network connection from a pipe connection pair. This method is part of the PipeConns type. ```go func (pc *PipeConns) Conn2() net.Conn ``` -------------------------------- ### Create New Raw HTTP Client Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use NewClient to create a new rawhttp client instance. Provide Options to configure the client's behavior, such as timeouts and redirect policies. ```go func NewClient(options *Options) *Client ``` -------------------------------- ### Client.NewClient Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Creates a new rawhttp Client with the specified options. ```APIDOC ## Client.NewClient ### Description Creates a new rawhttp Client with the specified options. ### Function Signature ```go func NewClient(options *Options) *Client ``` ``` -------------------------------- ### Create New Pipelined HTTP Client Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use NewPipelineClient to create a new client for making pipelined HTTP requests. Configure its behavior using PipelineOptions. ```go func NewPipelineClient(options PipelineOptions) *PipelineClient ``` -------------------------------- ### Client.DoRawWithOptions Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request with options using the client. ```APIDOC ## Client.DoRawWithOptions ### Description Performs a raw HTTP request with additional options using the client. ### Method Signature ```go func (c *Client) DoRawWithOptions(method, url, uripath string, headers map[string][]string, body io.Reader, ...) (*http.Response, error) ``` ``` -------------------------------- ### Do Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Sends an HTTP request and returns the corresponding response. ```APIDOC ## Do ### Description Sends a http request and returns a response. ### Function Signature ```go func Do(req *http.Request) (*http.Response, error) ``` ``` -------------------------------- ### Client Interface Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Represents a single HTTP connection. Connection pooling should be handled externally. ```go type Client interface { WriteRequest(*Request) error ReadResponse(forceReadAll bool) (*Response, error) } ``` -------------------------------- ### NewClient Function Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Creates a new Client instance that uses the provided io.ReadWriter for communication. ```go func NewClient(rw io.ReadWriter) Client ``` -------------------------------- ### PipelineClient.DoRawWithOptions Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request with options using the PipelineClient. ```APIDOC ## PipelineClient.DoRawWithOptions ### Description Performs a raw HTTP request with additional options using the PipelineClient. ### Method Signature ```go func (c *PipelineClient) DoRawWithOptions(method, url, uripath string, headers map[string][]string, body io.Reader, ...) (*http.Response, error) ``` ``` -------------------------------- ### Create HTTP Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Constructs a new HTTP Request object with specified method, path, query parameters, headers, and body. ```go func ToRequest(method string, path string, query []string, headers map[string][]string, body io.Reader) *Request ``` -------------------------------- ### Raw HTTP Client Default Options Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Defines the default configuration options for the rawhttp client, including timeouts, redirection policies, and automatic header settings. This is useful for initializing a client with common settings. ```go var DefaultOptions = &Options{ Timeout: 30 * time.Second, FollowRedirects: true, MaxRedirects: 10, AutomaticHostHeader: true, AutomaticContentLength: true, } ``` -------------------------------- ### Send HTTP Request with Client Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use the Do method on a Client to send an http.Request and receive the http.Response. This is the general-purpose method for executing requests. ```go func (c *Client) Do(req *http.Request) (*http.Response, error) ``` -------------------------------- ### Client.Do Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Sends an HTTP request using the client and returns the response. ```APIDOC ## Client.Do ### Description Sends an HTTP request using the client and returns the response. ### Method Signature ```go func (c *Client) Do(req *http.Request) (*http.Response, error) ``` ``` -------------------------------- ### PipelineClient Structure Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Defines the configuration options for a PipelineClient, used for managing HTTP requests and connections. ```go type PipelineClient struct { Addr string MaxConns int MaxPendingRequests int MaxBatchDelay time.Duration Dial DialFunc DialDualStack bool IsTLS bool TLSConfig *tls.Config MaxIdleConnDuration time.Duration ReadBufferSize int WriteBufferSize int ReadTimeout time.Duration WriteTimeout time.Duration // contains filtered or unexported fields } ``` -------------------------------- ### Raw HTTP Pipelined Client Default Options Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Specifies the default options for a pipelined HTTP client, controlling aspects like timeout, maximum connections, and pending requests. This is used for setting up efficient, concurrent HTTP requests. ```go var DefaultPipelineOptions = PipelineOptions{ Timeout: 30 * time.Second, MaxConnections: 5, MaxPendingRequests: 100, AutomaticHostHeader: true, } ``` -------------------------------- ### PipelineOptions: Configure Pipelined HTTP Client Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp PipelineOptions struct holds configuration settings for the pipelined HTTP client, including dialer, host, timeouts, and connection limits. ```go type PipelineOptions struct { Dialer clientpipeline.DialFunc Host string Timeout time.Duration MaxConnections int MaxPendingRequests int AutomaticHostHeader bool } ``` -------------------------------- ### Request Struct Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Represents a complete HTTP request, including method, path, version, headers, and body. ```go type Request struct { RawBytes []byte AutomaticContentLength bool AutomaticHost bool Method string Path string Query []string Version Headers []Header Body io.Reader } ``` -------------------------------- ### HTTP Version Variables Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Defines constants for HTTP/1.0 and HTTP/1.1 versions. ```go var ( HTTP_1_0 = Version{Major: 1, Minor: 0} HTTP_1_1 = Version{Major: 1, Minor: 1} ) ``` -------------------------------- ### PipelineClient.NewPipelineClient Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Creates a new PipelineClient with the specified pipeline options. ```APIDOC ## PipelineClient.NewPipelineClient ### Description Creates a new PipelineClient with the specified pipeline options. ### Function Signature ```go func NewPipelineClient(options PipelineOptions) *PipelineClient ``` ``` -------------------------------- ### Dial Dual Stack Network Connection with Timeout Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a dual-stack (IPv4/IPv6) network connection with a specified timeout using the TCPDialer. ```go func (d *TCPDialer) DialDualStackTimeout(addr string, timeout time.Duration) (net.Conn, error) ``` -------------------------------- ### PipelineClient.Do Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Executes a prepared HTTP request and populates the response object. This is the primary method for sending requests through the pipeline. ```APIDOC ## PipelineClient.Do ### Description Executes a prepared HTTP request and populates the response object. This is the primary method for sending requests through the pipeline. ### Method func (c *PipelineClient) Do(req *Request, resp *Response) error ### Parameters - **req** (*Request) - The HTTP request object to be sent. - **resp** (*Response) - The response object to be populated with the server's reply. ### Returns - **error** - An error if the request execution fails, otherwise nil. ``` -------------------------------- ### Create HTTP Dialer Function Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/proxy Creates a DialFunc for establishing connections via an HTTP proxy. Specify the proxy address and a connection timeout. ```go func HTTPDialer(proxyAddr string, timeout time.Duration) DialFunc ``` -------------------------------- ### Request Structure Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Represents a complete HTTP request, including method, path, headers, and body. ```go type Request struct { AutomaticContentLength bool AutomaticHost bool Method string Path string Query []string Version Headers []Header Body io.Reader } ``` -------------------------------- ### Perform Raw HTTP Request with Options Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use DoRawWithOptions for raw HTTP requests that require additional configuration options. This is useful for advanced scenarios like custom timeouts or redirect handling. ```go func DoRawWithOptions(method, url, uripath string, headers map[string][]string, body io.Reader, options *Options) (*http.Response, error) ``` ```go func (c *Client) DoRawWithOptions(method, url, uripath string, headers map[string][]string, body io.Reader, options *Options) (*http.Response, error) ``` -------------------------------- ### Version.String Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client String returns a string representation of the HTTP version (e.g., '1.1'). ```APIDOC ## Version.String ### Description String returns a string representation of the HTTP version (e.g., '1.1'). ### Method Signature ```go func (v *Version) String() string ``` ``` -------------------------------- ### TCPDialer Methods Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Methods for establishing TCP connections using a TCPDialer. ```APIDOC ## Dial (TCPDialer) ### Description Establishes a TCP connection to the specified address using the TCPDialer. ### Method func (d *TCPDialer) Dial(addr string) (net.Conn, error) ## DialDualStack (TCPDialer) ### Description Establishes a TCP connection to the specified address using dual-stack support with the TCPDialer. ### Method func (d *TCPDialer) DialDualStack(addr string) (net.Conn, error) ## DialDualStackTimeout (TCPDialer) ### Description Establishes a TCP connection to the specified address using dual-stack support and a specified timeout with the TCPDialer. ### Method func (d *TCPDialer) DialDualStackTimeout(addr string, timeout time.Duration) (net.Conn, error) ## DialTimeout (TCPDialer) ### Description Establishes a TCP connection to the specified address with a specified timeout using the TCPDialer. ### Method func (d *TCPDialer) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) ``` -------------------------------- ### DoRawWithOptions: Perform Raw HTTP Request with Options Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use DoRawWithOptions to execute a raw HTTP request with custom options. It requires specifying the HTTP method, URL, path, headers, request body, and pipeline options. ```go func (c *PipelineClient) DoRawWithOptions(method, url, uripath string, headers map[string][]string, body io.Reader, options PipelineOptions) (*http.Response, error) ``` -------------------------------- ### DoRawWithOptions Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request with specified options. ```APIDOC ## DoRawWithOptions ### Description Performs a raw HTTP request with specified method, URL, path, headers, body, and additional options. ### Function Signature ```go func DoRawWithOptions(method, url, uripath string, headers map[string][]string, body io.Reader, ...) (*http.Response, error) ``` ``` -------------------------------- ### HTTPDialer Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/proxy Creates a DialFunc that establishes connections through an HTTP proxy. ```APIDOC ## HTTPDialer ### Description Creates a DialFunc that establishes connections through an HTTP proxy. ### Signature ```go func HTTPDialer(proxyAddr string, timeout time.Duration) DialFunc ``` ### Parameters - **proxyAddr** (string) - The address of the HTTP proxy (e.g., "127.0.0.1:8080"). - **timeout** (time.Duration) - The timeout for establishing the connection. ### Returns - **DialFunc**: A function that takes a network address and returns a net.Conn and an error. ``` -------------------------------- ### Dial Network Connection with Timeout Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a network connection with a specified timeout using the TCPDialer. ```go func (d *TCPDialer) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) ``` -------------------------------- ### Create SOCKS5 Dialer Function Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/proxy Creates a DialFunc for establishing connections via a SOCKS5 proxy. Provide the proxy address and a connection timeout. ```go func Socks5Dialer(proxyAddr string, timeout time.Duration) DialFunc ``` -------------------------------- ### PipelineClient.Do Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Sends an HTTP request using the PipelineClient. ```APIDOC ## PipelineClient.Do ### Description Sends an HTTP request using the PipelineClient and returns the response. ### Method Signature ```go func (c *PipelineClient) Do(req *http.Request) (*http.Response, error) ``` ``` -------------------------------- ### Create Fast HTTP Dialer Function Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/proxy Creates a DialFunc for establishing connections via an HTTP proxy using a pre-initialized fastdialer.Dialer. This can be more efficient for repeated connections. ```go func HTTPFastDialer(proxyAddr string, timeout time.Duration, fd *fastdialer.Dialer) DialFunc ``` -------------------------------- ### Execute HTTP Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Executes an HTTP request using the PipelineClient and populates the response. This method is part of the PipelineClient type. ```go func (c *PipelineClient) Do(req *Request, resp *Response) error ``` -------------------------------- ### Post: Make a POST Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Post makes a POST request to a specified URL, including the content type and request body. It returns the HTTP response and any error encountered. ```go func (c *PipelineClient) Post(url string, mimetype string, body io.Reader) (*http.Response, error) ``` -------------------------------- ### NewClient Function Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Creates a new Client instance that uses the provided io.ReadWriter for communication. ```APIDOC ## NewClient Function ### Description NewClient returns a Client implementation which uses rw to communicate. ### Signature `func NewClient(rw io.ReadWriter) Client` ### Parameters - `rw` (io.ReadWriter) - The ReadWriter to use for communication. ``` -------------------------------- ### Client.Post Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Makes a POST request to the specified URL using the client with a given MIME type and reader. ```APIDOC ## Post (Client Method) ### Description Post makes a POST request to a given URL. ### Signature ```go func (c *Client) Post(url string, mimetype string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### PipeConns Methods Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Methods for managing pipe connections. ```APIDOC ## NewPipeConns ### Description Creates a new PipeConns object. ### Method func NewPipeConns() *PipeConns ## Close (PipeConns) ### Description Closes the pipe connections. ### Method func (pc *PipeConns) Close() error ## Conn1 ### Description Returns the first connection in the pipe. ### Method func (pc *PipeConns) Conn1() net.Conn ## Conn2 ### Description Returns the second connection in the pipe. ### Method func (pc *PipeConns) Conn2() net.Conn ``` -------------------------------- ### Client.Head Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP HEAD request using the client. ```APIDOC ## Client.Head ### Description Performs an HTTP HEAD request to the specified URL using the client. ### Method Signature ```go func (c *Client) Head(url string) (*http.Response, error) ``` ``` -------------------------------- ### PipelineClient.NewPipelineClient Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Creates a new pipelined HTTP request client. ```APIDOC ## NewPipelineClient ### Description NewPipelineClient creates a new pipelined http request client. ### Signature ```go func NewPipelineClient(options PipelineOptions) *PipelineClient ``` ``` -------------------------------- ### HTTPFastDialer Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/proxy Creates a DialFunc for establishing connections through an HTTP proxy using a pre-initialized fastdialer. ```APIDOC ## HTTPFastDialer ### Description Creates a DialFunc for establishing connections through an HTTP proxy using a pre-initialized fastdialer. This can be more efficient if a fastdialer is already in use. ### Signature ```go func HTTPFastDialer(proxyAddr string, timeout time.Duration, fd *fastdialer.Dialer) DialFunc ``` ### Parameters - **proxyAddr** (string) - The address of the HTTP proxy (e.g., "127.0.0.1:8080"). - **timeout** (time.Duration) - The timeout for establishing the connection. - **fd** (*fastdialer.Dialer) - A pointer to an initialized fastdialer.Dialer. ### Returns - **DialFunc**: A function that takes a network address and returns a net.Conn and an error. ``` -------------------------------- ### Client.Post Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP POST request using the client. ```APIDOC ## Client.Post ### Description Performs an HTTP POST request to the specified URL with a given content type and body reader using the client. ### Method Signature ```go func (c *Client) Post(url string, mimetype string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### Socks5Dialer Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/proxy Creates a DialFunc that establishes connections through a SOCKS5 proxy. ```APIDOC ## Socks5Dialer ### Description Creates a DialFunc that establishes connections through a SOCKS5 proxy. ### Signature ```go func Socks5Dialer(proxyAddr string, timeout time.Duration) DialFunc ``` ### Parameters - **proxyAddr** (string) - The address of the SOCKS5 proxy (e.g., "127.0.0.1:1080"). - **timeout** (time.Duration) - The timeout for establishing the connection. ### Returns - **DialFunc**: A function that takes a network address and returns a net.Conn and an error. ``` -------------------------------- ### Message Interface Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Defines common methods for both HTTP requests and responses. ```go type Message interface { ContentLength() int64 CloseRequested() bool } ``` -------------------------------- ### Header Struct Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Represents a single HTTP header with a key-value pair. ```go type Header struct { Key string Value string } ``` -------------------------------- ### Create New Pipe Connections Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline NewPipeConns creates and returns a new PipeConns object. ```go func NewPipeConns() *PipeConns ``` -------------------------------- ### Head Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Makes a HEAD request to the specified URL. ```APIDOC ## Head ### Description Makes a HEAD request to a given URL. ### Method Signature ```go func (c *PipelineClient) Head(url string) (*http.Response, error) ``` ### Parameters - `url` (string): The URL to send the HEAD request to. ``` -------------------------------- ### Dial Network Connection Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a network connection to the specified address using the TCPDialer. ```go func (d *TCPDialer) Dial(addr string) (net.Conn, error) ``` -------------------------------- ### Dial Dual Stack Network Connection Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a dual-stack (IPv4/IPv6) network connection to the specified address using the TCPDialer. ```go func (d *TCPDialer) DialDualStack(addr string) (net.Conn, error) ``` -------------------------------- ### Enable Automatic Host Header Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Configures the rawhttp package to automatically set the Host header for outgoing requests. This is useful for ensuring correct host resolution and is usually enabled by default. ```go func AutomaticHostHeader(enable bool) ``` -------------------------------- ### Make HTTP POST Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use Post to make an HTTP POST request with a specified MIME type and request body. This function is suitable for submitting data. ```go func Post(url string, mimetype string, r io.Reader) (*http.Response, error) ``` ```go func (c *Client) Post(url string, mimetype string, body io.Reader) (*http.Response, error) ``` -------------------------------- ### Client.DoRaw Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request using the client. ```APIDOC ## Client.DoRaw ### Description Performs a raw HTTP request using the client with the specified method, URL, path, headers, and body. ### Method Signature ```go func (c *Client) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### Post Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Makes a POST request to the specified URL with a given MIME type and request body. ```APIDOC ## Post ### Description Makes a POST request to a given URL. ### Method Signature ```go func (c *PipelineClient) Post(url string, mimetype string, body io.Reader) (*http.Response, error) ``` ### Parameters - `url` (string): The URL to send the POST request to. - `mimetype` (string): The MIME type of the request body. - `body` (io.Reader): An io.Reader for the request body. ``` -------------------------------- ### TCPDialer.Dial Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a TCP connection to the specified address. ```APIDOC ## TCPDialer.Dial ### Description Establishes a TCP connection to the specified address. ### Method func (d *TCPDialer) Dial(addr string) (net.Conn, error) ### Parameters - **addr** (string) - The address to connect to (e.g., "host:port"). ### Returns - **net.Conn** - The established network connection. - **error** - An error if the connection fails. ``` -------------------------------- ### PipelineClient.Head Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP HEAD request using the PipelineClient. ```APIDOC ## PipelineClient.Head ### Description Performs an HTTP HEAD request to the specified URL using the PipelineClient. ### Method Signature ```go func (c *PipelineClient) Head(url string) (*http.Response, error) ``` ``` -------------------------------- ### Response Structure Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Represents an RFC2616 compliant HTTP response, including status, headers, and body. ```go type Response struct { Version Status Headers []Header Body io.Reader // contains filtered or unexported fields } ``` -------------------------------- ### Version Structure Definition Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Defines the Version structure for HTTP versions, containing major and minor version numbers. ```go type Version struct { Major int Minor int } ``` -------------------------------- ### PipelineClient.DoRaw Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request using the PipelineClient. ```APIDOC ## PipelineClient.DoRaw ### Description Performs a raw HTTP request using the PipelineClient with the specified method, URL, path, headers, and body. ### Method Signature ```go func (c *PipelineClient) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### PipelineClient.Post Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP POST request using the PipelineClient. ```APIDOC ## PipelineClient.Post ### Description Performs an HTTP POST request to the specified URL with a given content type and body reader using the PipelineClient. ### Method Signature ```go func (c *PipelineClient) Post(url string, mimetype string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### PipelineClient Methods Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Methods for interacting with the PipelineClient, including executing requests and checking pending requests. ```APIDOC ## Do ### Description Executes a prepared HTTP request and populates the response. ### Method func (c *PipelineClient) Do(req *Request, resp *Response) error ## PendingRequests ### Description Returns the number of requests currently pending in the pipeline. ### Method func (c *PipelineClient) PendingRequests() int ``` -------------------------------- ### Status.String Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client String returns a string representation of the HTTP status code and reason. ```APIDOC ## Status.String ### Description String returns a string representation of the HTTP status code and reason. ### Method Signature ```go func (s Status) String() string ``` ``` -------------------------------- ### Send HTTP Request with Pipeline Client Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use the Do method on a PipelineClient to send an http.Request and receive the http.Response. This method is specific to pipelined requests. ```go func (c *PipelineClient) Do(req *http.Request) (*http.Response, error) ``` -------------------------------- ### Request Construction Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Utility function to create a new Request object with specified method, path, query parameters, headers, and body. ```APIDOC ## ToRequest ### Description Utility function to create a new Request object with specified method, path, query parameters, headers, and body. ### Method func ToRequest(method string, path string, query []string, headers map[string][]string, body io.Reader) *Request ### Parameters - **method** (string) - The HTTP method (e.g., "GET", "POST"). - **path** (string) - The request path. - **query** ([]string) - A slice of query parameters. - **headers** (map[string][]string) - A map of request headers. - **body** (io.Reader) - An io.Reader for the request body. ### Returns - **(*Request)** - A pointer to the newly created Request object. ``` -------------------------------- ### Head: Make a HEAD Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Head is used to make a HEAD request to a given URL. This is useful for retrieving headers without the response body. ```go func (c *PipelineClient) Head(url string) (*http.Response, error) ``` -------------------------------- ### Client.DoRaw Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request using the client with specified method, URL, path, headers, and body. ```APIDOC ## DoRaw (Client Method) ### Description DoRaw does a raw request with some configuration. ### Signature ```go func (c *Client) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### Dial Functions Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Functions for establishing network connections with optional timeouts and dual-stack support. ```APIDOC ## Dial ### Description Establishes a network connection to the specified address. ### Method func Dial(addr string) (net.Conn, error) ## DialDualStack ### Description Establishes a network connection to the specified address using dual-stack (IPv4/IPv6) support. ### Method func DialDualStack(addr string) (net.Conn, error) ## DialDualStackTimeout ### Description Establishes a network connection to the specified address using dual-stack support with a specified timeout. ### Method func DialDualStackTimeout(addr string, timeout time.Duration) (net.Conn, error) ## DialTimeout ### Description Establishes a network connection to the specified address with a specified timeout. ### Method func DialTimeout(addr string, timeout time.Duration) (net.Conn, error) ``` -------------------------------- ### Enable Automatic Content Length Calculation Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Controls whether the rawhttp package automatically calculates and sets the Content-Length header for requests. This is typically enabled by default. ```go func AutomaticContentLength(enable bool) ``` -------------------------------- ### Headers Type Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client A collection of Header objects, implementing sort.Interface. ```go type Headers []Header ``` ```go func (h Headers) Len() int ``` ```go func (h Headers) Less(i, j int) bool ``` ```go func (h Headers) Swap(i, j int) ``` -------------------------------- ### Request Methods Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Methods for creating and manipulating HTTP requests. ```APIDOC ## ToRequest ### Description Creates a new Request object. ### Method func ToRequest(method string, path string, query []string, headers map[string][]string, ...) *Request ## ContentLength ### Description Returns the content length of the request. ### Method func (r *Request) ContentLength() int64 ## Write ### Description Writes the request to a buffer. ### Method func (r *Request) Write(w *bufio.Writer) error ``` -------------------------------- ### Perform TLS Handshake Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use TlsHandshake to perform a TLS handshake on an existing plain connection. This is useful for upgrading a connection to be secure. ```go func TlsHandshake(conn net.Conn, addr string, timeout time.Duration) (net.Conn, error) ``` -------------------------------- ### TCPDialer.DialDualStack Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a TCP connection to the specified address, attempting to use both IPv4 and IPv6 if available. ```APIDOC ## TCPDialer.DialDualStack ### Description Establishes a TCP connection to the specified address, attempting to use both IPv4 and IPv6 if available. ### Method func (d *TCPDialer) DialDualStack(addr string) (net.Conn, error) ### Parameters - **addr** (string) - The address to connect to (e.g., "host:port"). ### Returns - **net.Conn** - The established network connection. - **error** - An error if the connection fails. ``` -------------------------------- ### Make HTTP HEAD Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use Head to make an HTTP HEAD request to a specified URL. This method is useful for retrieving headers without the response body. ```go func (c *Client) Head(url string) (*http.Response, error) ``` -------------------------------- ### Version Type Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Represents an HTTP version (e.g., 1.0, 1.1). ```APIDOC ## Version Type ### Description Version represents an HTTP version. ### Methods - `String() string`: Returns the string representation of the version (e.g., "1.1"). ``` -------------------------------- ### Newline Constant Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Defines the standard HTTP newline sequence used for message formatting. ```go const NewLine = "\r\n" ``` -------------------------------- ### Request.Write Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Writes the complete HTTP request to a buffer. This is typically used internally by the client to send the request over the network. ```APIDOC ## Request.Write ### Description Writes the complete HTTP request to a buffer. This is typically used internally by the client to send the request over the network. ### Method func (r *Request) Write(w *bufio.Writer) error ### Parameters - **w** (*bufio.Writer) - The buffer to write the request to. ### Returns - **error** - An error if writing fails, otherwise nil. ``` -------------------------------- ### Post Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs an HTTP POST request to the specified URL with a given content type and reader. ```APIDOC ## Post ### Description Performs an HTTP POST request to the specified URL with a given content type and reader. ### Function Signature ```go func Post(url string, mimetype string, r io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### Client Interface Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client The Client interface represents a single connection to an HTTP server. It handles writing requests and reading responses, with connection pooling expected at a higher layer. ```APIDOC ## Client Interface ### Description Client represents a single connection to a http server. Client obeys KeepAlive conditions for HTTP but connection pooling is expected to be handled at a higher layer. ### Methods - `WriteRequest(*Request) error`: Writes a given Request to the client's connection. - `ReadResponse(forceReadAll bool) (*Response, error)`: Reads a Response from the client's connection. `forceReadAll` dictates whether to read the entire body even if not explicitly requested. ``` -------------------------------- ### TCPDialer Structure Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Contains options to control a group of Dial calls, including concurrency and local address settings. ```go type TCPDialer struct { Concurrency int LocalAddr *net.TCPAddr Resolver Resolver // contains filtered or unexported fields } ``` -------------------------------- ### Dialer.DialWithProxy Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Dials a remote HTTP server through a proxy. ```APIDOC ## DialWithProxy ### Description DialWithProxy dials a remote http server with proxy. ### Signature ```go func (d Dialer) DialWithProxy(protocol, addr, proxyURL string, timeout time.Duration, options *Options) (Conn, error) ``` ``` -------------------------------- ### PipeConns.Conn1 Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Returns the first connection managed by PipeConns. ```APIDOC ## PipeConns.Conn1 ### Description Returns the first connection managed by PipeConns. ### Method func (pc *PipeConns) Conn1() net.Conn ### Returns - **net.Conn** - The first network connection. ``` -------------------------------- ### DoRaw Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a raw HTTP request with specified method, URL, path, headers, and body. ```APIDOC ## DoRaw ### Description Performs a raw HTTP request with specified method, URL, path, headers, and body. ### Function Signature ```go func DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ``` ``` -------------------------------- ### Header Type Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Represents a single HTTP header with a key and value. ```APIDOC ## Header Type ### Description Header represents a HTTP header. ### Fields - `Key string`: The header key. - `Value string`: The header value. ``` -------------------------------- ### Request Type Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Represents a complete HTTP request, including method, path, headers, and body. ```APIDOC ## Request Type ### Description Request represents a complete HTTP request. ### Fields - `RawBytes []byte`: The raw bytes of the request. - `AutomaticContentLength bool`: If true, ContentLength will be automatically calculated. - `AutomaticHost bool`: If true, the Host header will be automatically added. - `Method string`: The HTTP method (e.g., GET, POST). - `Path string`: The request path. - `Query []string`: Query parameters. - `Version`: The HTTP version. - `Headers []Header`: A slice of HTTP headers. - `Body io.Reader`: The request body. ``` -------------------------------- ### Send HTTP Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Sends a given http.Request and returns the http.Response or an error. This is a core function for making HTTP requests using the rawhttp package. ```go func Do(req *http.Request) (*http.Response, error) ``` -------------------------------- ### TCPDialer.DialTimeout Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a TCP connection to the specified address with a timeout. ```APIDOC ## TCPDialer.DialTimeout ### Description Establishes a TCP connection to the specified address with a timeout. ### Method func (d *TCPDialer) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) ### Parameters - **addr** (string) - The address to connect to (e.g., "host:port"). - **timeout** (time.Duration) - The maximum time to wait for the connection. ### Returns - **net.Conn** - The established network connection. - **error** - An error if the connection fails or times out. ``` -------------------------------- ### PipeConns.Conn2 Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Returns the second connection managed by PipeConns. ```APIDOC ## PipeConns.Conn2 ### Description Returns the second connection managed by PipeConns. ### Method func (pc *PipeConns) Conn2() net.Conn ### Returns - **net.Conn** - The second network connection. ``` -------------------------------- ### Timeout Error Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Represents a generic timeout error. ```go var ( ErrTimeout = &timeoutError{} ) ``` -------------------------------- ### Write HTTP Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Writes the HTTP request to a buffered writer. This method is part of the Request type. ```go func (r *Request) Write(w *bufio.Writer) error ``` -------------------------------- ### Response Structure Definition Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Defines the Response structure for RFC2616 responses, including version, status, headers, and body. ```go type Response struct { Version Status Headers []Header Body io.Reader } ``` -------------------------------- ### RedirectStatus: Manage Redirects Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp RedirectStatus tracks the state of HTTP redirects, including whether to follow them, the maximum number of redirects allowed, and the current redirect count. ```go type RedirectStatus struct { FollowRedirects bool MaxRedirects int Current int } ``` -------------------------------- ### Dialer.Dial Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Dials a remote HTTP server and returns a Conn. ```APIDOC ## Dial ### Description Dial dials a remote http server returning a Conn. ### Signature ```go func (d Dialer) Dial(protocol, addr string, options *Options) (Conn, error) ``` ``` -------------------------------- ### Read HTTP Version Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Reads the HTTP version from a buffered reader. This method is part of the Response type. ```go func (resp *Response) ReadVersion(r *bufio.Reader) (Version, error) ``` -------------------------------- ### AutomaticHostHeader Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Controls the automatic setting of the Host header for requests. ```APIDOC ## AutomaticHostHeader ### Description Sets Host header for requests automatically. ### Function Signature ```go func AutomaticHostHeader(enable bool) ``` ``` -------------------------------- ### Client.Dor Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Sends a retryable HTTP request using the client and returns the response. ```APIDOC ## Dor (Client Method) ### Description Dor sends a retryablehttp request and returns the response. ### Signature ```go func (c *Client) Dor(req *retryablehttp.Request) (*http.Response, error) ``` ``` -------------------------------- ### Resolver Interface Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Represents an interface for TCP name resolution, defining a method to look up IP addresses. ```go type Resolver interface { LookupIPAddr(context.Context, string) (names []net.IPAddr, err error) } ``` -------------------------------- ### Headers Type Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client A collection of HTTP headers, implementing sort.Interface. ```APIDOC ## Headers Type ### Description Headers is a slice of Header, implementing sort.Interface. ### Methods - `Len() int`: Returns the number of headers. - `Less(i, j int) bool`: Compares two headers for sorting. - `Swap(i, j int)`: Swaps two headers. ``` -------------------------------- ### TCPDialer.DialDualStackTimeout Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Establishes a TCP connection to the specified address with a timeout, attempting to use both IPv4 and IPv6. ```APIDOC ## TCPDialer.DialDualStackTimeout ### Description Establishes a TCP connection to the specified address with a timeout, attempting to use both IPv4 and IPv6. ### Method func (d *TCPDialer) DialDualStackTimeout(addr string, timeout time.Duration) (net.Conn, error) ### Parameters - **addr** (string) - The address to connect to (e.g., "host:port"). - **timeout** (time.Duration) - The maximum time to wait for the connection. ### Returns - **net.Conn** - The established network connection. - **error** - An error if the connection fails or times out. ``` -------------------------------- ### TlsHandshake Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Performs a TLS handshake on a given network connection. ```APIDOC ## TlsHandshake ### Description Performs a TLS handshake on a given network connection to a specified address with a timeout. ### Function Signature ```go func TlsHandshake(conn net.Conn, addr string, timeout time.Duration) (net.Conn, error) ``` ``` -------------------------------- ### Client.Close Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Closes the rawhttp Client and releases any associated resources. ```APIDOC ## Client.Close ### Description Closes the rawhttp Client and releases any associated resources, such as temporary files created by the dialer. ### Method Signature ```go func (c *Client) Close() ``` ``` -------------------------------- ### Response Methods Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Methods for reading and processing HTTP responses. ```APIDOC ## CloseRequested ### Description Checks if the client requested the connection to be closed. ### Method func (r *Response) CloseRequested() bool ## ContentLength ### Description Returns the content length of the response body. ### Method func (r *Response) ContentLength() int64 ## Read ### Description Reads the response from a buffer. ### Method func (resp *Response) Read(r *bufio.Reader) error ## ReadBody ### Description Returns an io.Reader for the response body. ### Method func (resp *Response) ReadBody(r *bufio.Reader) io.Reader ## ReadHeader ### Description Reads the response header from a buffer. ### Method func (resp *Response) ReadHeader(r *bufio.Reader) (string, string, bool, error) ## ReadStatusCode ### Description Reads the HTTP status code from a buffer. ### Method func (resp *Response) ReadStatusCode(r *bufio.Reader) (int, error) ## ReadStatusLine ### Description Reads the status line (HTTP version, status code, reason phrase) from a buffer. ### Method func (resp *Response) ReadStatusLine(r *bufio.Reader) (Version, int, string, error) ## ReadVersion ### Description Reads the HTTP version from a buffer. ### Method func (resp *Response) ReadVersion(r *bufio.Reader) (Version, error) ## TransferEncoding ### Description Returns the transfer encoding of the response. ### Method func (r *Response) TransferEncoding() string ``` -------------------------------- ### Response.ReadVersion Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline Reads the HTTP version from the response buffer. ```APIDOC ## Response.ReadVersion ### Description Reads the HTTP version from the response buffer. ### Method func (resp *Response) ReadVersion(r *bufio.Reader) (Version, error) ### Parameters - **r** (*bufio.Reader) - The buffer to read the version from. ### Returns - **Version** - The HTTP version. - **error** - An error if reading fails. ``` -------------------------------- ### Default Max Idle Connection Duration Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/clientpipeline DefaultMaxIdleConnDuration specifies the maximum duration for idle connections. ```go const DefaultMaxIdleConnDuration = 10 * time.Second ``` -------------------------------- ### Check if Status is Success Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client IsSuccess checks if the HTTP status code indicates success (2xx). ```go func (s Status) IsSuccess() bool ``` -------------------------------- ### HTTP Status Code Constants Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp/client Defines constants for standard HTTP status codes, categorized by informational, success, redirection, client error, and server error. ```go const ( INFO_CONTINUE = 100 INFO_SWITCHING_PROTOCOL = 101 INFO_PROCESSING = 102 SUCCESS_OK = 200 SUCCESS_CREATED = 201 SUCCESS_ACCEPTED = 202 SUCCESS_NON_AUTHORITATIVE = 203 SUCCESS_NO_CONTENT = 204 SUCCESS_RESET_CONTENT = 205 SUCCESS_PARTIAL_CONTENT = 206 SUCCESS_MULTI_STATUS = 207 REDIRECTION_MULTIPLE_CHOICES = 300 REDIRECTION_MOVED_PERMANENTLY = 301 REDIRECTION_MOVED_TEMPORARILY = 302 REDIRECTION_SEE_OTHER = 303 REDIRECTION_NOT_MODIFIED = 304 REDIRECTION_USE_PROXY = 305 REDIRECTION_TEMPORARY_REDIRECT = 307 CLIENT_ERROR_BAD_REQUEST = 400 CLIENT_ERROR_UNAUTHORIZED = 401 CLIENT_ERROR_PAYMENT_REQUIRED = 402 CLIENT_ERROR_FORBIDDEN = 403 CLIENT_ERROR_NOT_FOUND = 404 CLIENT_ERROR_METHOD_NOT_ALLOWED = 405 CLIENT_ERROR_NOT_ACCEPTABLE = 406 CLIENT_ERROR_PROXY_AUTHENTIFICATION_REQUIRED = 407 CLIENT_ERROR_REQUEST_TIMEOUT = 408 CLIENT_ERROR_CONFLICT = 409 CLIENT_ERROR_GONE = 410 CLIENT_ERROR_LENGTH_REQUIRED = 411 CLIENT_ERROR_PRECONDITION_FAILED = 412 CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE = 413 CLIENT_ERROR_REQUEST_URI_TOO_LONG = 414 CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE = 415 CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE = 416 CLIENT_ERROR_EXPECTATION_FAILED = 417 CLIENT_ERROR_UNPROCESSABLE_ENTITY = 422 CLIENT_ERROR_LOCKED = 423 CLIENT_ERROR_FAILED_DEPENDENCY = 424 SERVER_ERROR_INTERNAL = 500 SERVER_ERROR_NOT_IMPLEMENTED = 501 SERVER_ERROR_BAD_GATEWAY = 502 SERVER_ERROR_SERVICE_UNAVAILABLE = 503 SERVER_ERROR_GATEWAY_TIMEOUT = 504 SERVER_ERROR_HTTP_VERSION_NOT_SUPPORTED = 505 SERVER_ERROR_INSUFFICIENT_STORAGE = 507 ) ``` -------------------------------- ### Close Raw HTTP Client Resources Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use Close to release any resources held by the rawhttp client. This should be called when the client is no longer needed to prevent resource leaks. ```go func (c *Client) Close() ``` -------------------------------- ### Perform Raw HTTP Request Source: https://pkg.go.dev/github.com/projectdiscovery/rawhttp Use DoRaw to perform a raw HTTP request with specified method, URL, path, headers, and body. This function is suitable for custom request configurations. ```go func DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ``` ```go func (c *Client) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ``` ```go func (c *PipelineClient) DoRaw(method, url, uripath string, headers map[string][]string, body io.Reader) (*http.Response, error) ```