Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
指定一个自定义 HTTP 标头。
custom_header=header
HTTP 标头的格式为 header-name: header-value。
无
指定了自定义 HTTP 标头后,客户端会在发送的每个 HTTP 请求中都包含这些标头。要指定多个自定义标头,可多次使用 custom_header,并使用分号 (;) 作为分隔符。例如:custom_header=header1:value1; customer_header=header2:value2
自定义标头对于同步客户端与需要自定义标头的第三方工具进行交互十分有用。
有关如何设置 dbmlsync 网络协议选项的信息,请参见CommunicationAddress (adr) 扩展选项。
有关如何设置 UltraLite 网络协议选项的信息,请参见UltraLite 同步流的网络协议选项。
有些 HTTP 代理要求所有请求都包含特殊标头。下面的示例在某个嵌入式 SQL 或 C++ UltraLite 应用程序中将一个名为 MyProxyHdr 的自定义 HTTP 标头设置为值 ProxyUser:
info.stream = "http"; info.stream_parms = TEXT( "host=www.myhost.com;proxy_host=www.myproxy.com; custom_header=MyProxyHdr:ProxyUser");