 
     uri = URI.parse(server)
     url = (uri.scheme || "https") <> "://" <> uri.host <> ":" <> to_string(uri.port)
+    user_agent = "FarmbotOS/#{@version} (#{@target}) #{@target} ()"
 
     Tesla.client([
       {Tesla.Middleware.BaseUrl, url},

  alias FarmbotCore.JSON

  alias FarmbotCore.Asset.{
    StorageAuth,
    FbosConfig,
    FirmwareConfig
  }

  alias FarmbotCore.{BotState, BotState.JobProgress.Percent}

  require FarmbotCore.Logger
  import FarmbotCore.Config, only: [get_config_value: 3]

  use Tesla
  alias Tesla.Multipart

  # adapter(Tesla.Adapter.Hackney)
  plug(Tesla.Middleware.JSON, decode: &JSON.decode/1, encode: &JSON.encode/1)

       [
         {"content-type", "application/json"},
         {"authorization", "Bearer: " <> binary_token},
         {"user-agent", user_agent}
       ]}
    ])
  end
