SetHeaderField method (NotesHTTPRequest - LotusScript)

Sets content headers to be used in a request to a web server.

Defined in

NotesHTTPrequest

Syntax

Call NotesHTTPRequest.SetHeaderField(headerfield$, headervalue$)

Parameters

headerfield$

String. The name of the header to set.

headervalue$

String. The value of the header to set.

Usage

Add header fields by successive calls to setHeaderField. headerFields persist from one call to another until resetHeaders method is called to reset back to defaults.

By default, the following headers are set by default for each request; they can be customized or overridden:
  • Accept: application/json
  • Content-Type: application/json
  • charsets: utf-8

Example

Dim webRequest as NotesHTTPRequest
Set webRequest = NotesSession.CreateHTTPRequest()
Call webRequest.SetHeaderField(headerfield$, headervalue$)