func (s *server) bytesGetHandler(w http.ResponseWriter, r *http.Request) {
	logger := tracing.NewLoggerWithTraceID(r.Context(), s.logger).Logger
	nameOrHex := mux.Vars(r)["address"]

	address, err := s.resolveNameOrAddress(nameOrHex)
	if err != nil {
		logger.Debugf("bytes: parse address %s: %v", nameOrHex, err)
		logger.Error("bytes: parse address error")
		jsonhttp.NotFound(w, nil)
		return
	}

	additionalHeaders := http.Header{
		"Content-Type": {"application/octet-stream"},
	}

	s.downloadHandler(w, r, address, additionalHeaders, true)
}
// bytesGetHandler handles retrieval of raw binary data of arbitrary length.
bytesGetHandler handles retrieval of raw binary data of arbitrary length.
// bytesGetHandler handles retrieval of raw binary data of arbitrary length .
func (s *server) bytesGetHandler(w http.ResponseWriter, r *http.Request) {
	logger := tracing.NewLoggerWithTraceID(r.Context(), s.logger).Logger
	nameOrHex := mux.Vars(r)["address"]
	address, err := s.resolveNameOrAddress(nameOrHex)
	if err != nil {
		logger.Debugf("bytes: parse address %s: %v", nameOrHex, err)
		logger.Error("bytes: parse address error")
		jsonhttp.NotFound(w, nil)
		return
	}
	additionalHeaders := http.Header{
		"Content-Type": {"application/octet-stream"},
	}
	s.downloadHandler(w, r, address, additionalHeaders, true)
}
func ( s * server ) bytesGetHandler ( w http . ResponseWriter , r * http . Request ) { logger := tracing . NewLoggerWithTraceID ( r . Context ( ) , s . logger ) . Logger nameOrHex := mux . Vars ( r ) [ " " ] address , err := s . resolveNameOrAddress ( nameOrHex ) if err != nil { logger . Debugf ( " " , nameOrHex , err ) logger . Error ( " " ) jsonhttp . NotFound ( w , nil ) return } additionalHeaders := http . Header { " " : { " " } , } s . downloadHandler ( w , r , address , additionalHeaders , true ) }
bytesGetHandler handles retrieval of raw binary data of arbitrary length.
bytesGetHandler handles retrieval of raw binary data of arbitrary length .