Skip to content

//okhttp/okhttp3/Headers/toString

toString

[common]\ expect open override fun toString(): String

Returns header names and values. The names and values are separated by : and each pair is followed by a newline character \n.

Since OkHttp 5 this redacts these sensitive headers:

  • Authorization
  • Cookie
  • Proxy-Authorization
  • Set-Cookie

[jvm, nonJvm]\ [jvm, nonJvm]\ actual open override fun toString(): String