# Class BSV::Overlay::HTTPSBroadcastFacilitator <a id="class-BSV-Overlay-HTTPSBroadcastFacilitator"></a>

**Inherits:** `BSV::Overlay::BroadcastFacilitator`

Default HTTPS-based broadcast facilitator using Net::HTTP.

POSTs to +{url}/submit+ with a binary BEEF body, +Content-Type:
application/octet-stream+, and an <code>X-Topics</code> header containing the
JSON-encoded list of topics for the tagged BEEF.

HTTPS is enforced by default; pass +allow_http: true+ to permit plain HTTP
(useful for local development and testing).

An injectable `http_client` may be supplied for testing. It must respond to
+#request(uri, net_http_request)+ and return an object with <code>#code</code>
and <code>#body</code>.

## Constants
### `DEFAULT_TIMEOUT` <a id="constant-DEFAULT_TIMEOUT"></a> <a id="DEFAULT_TIMEOUT-constant"></a>
Not documented.

## Public Instance Methods
### `initialize(allow_http: = false, http_client: = nil, timeout: = DEFAULT_TIMEOUT)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
- **@param** `allow_http` [Boolean] permit non-HTTPS URLs (default: false)
- **@param** `http_client` [#request, nil] injectable HTTP client for testing
- **@param** `timeout` [Integer] request timeout in seconds (default: 30)
- **@return** [HTTPSBroadcastFacilitator] a new instance of HTTPSBroadcastFacilitator

### `send_beef(url, tagged_beef)` <a id="method-i-send_beef"></a> <a id="send_beef-instance_method"></a>
Send a tagged BEEF to +{url}/submit+ and return the parsed STEAK hash.
- **@param** `url` [String] base URL of the Overlay Services host
- **@param** `tagged_beef` [TaggedBEEF] the tagged BEEF to broadcast
- **@raise** [ArgumentError] if the URL is not HTTPS and +allow_http+ is false
- **@return** [Hash{String => AdmittanceInstructions}, nil] parsed STEAK response, or nil if the host returned an error or
the response could not be parsed
