Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status Under Consideration
Workspace Domino Designer
Categories LotusScript
Created by Guest
Created on Oct 20, 2020

Reading or passing header parameters from a NotesAgent


How can we read the parameter par1 set into the Header?

Using a simple call code action (ran on Notes client -> Action):

Dim session As New NotesSession
Dim webRequest As NotesHTTPRequest
Dim url as String
Dim out as string
Set webRequest = session.CreateHTTPRequest()
Call webRequest.ResetHeaders()
Call webRequest.SetHeaderField("par1", |testblabbla|)

This is the NotesAgent

Dim s As NotesSession
Dim doc As NotesDocument
Set s = New NotesSession
Set doc = s.documentcontext
If doc.QUERY_STRING_DECODED(0)<>"" Then'it's a GET
myQuerystring = doc.QUERY_STRING_DECODED(0)+"&cond=1"
ElseIf doc.QUERY_STRING(0)<>"" Then
myQuerystring = doc.QUERY_STRING(0)+"&cond=2"
'decode it !
ElseIf doc.REQUEST_CONTENT(0)<>"" Then'it's a POST
myQuerystring = doc.REQUEST_CONTENT(0)+"&cond=3" ' WARNING this is for POST but you will have to decode !!!
'decode it !
Print "error"
End If
Print myQuerystring

the generated output for the agent

<body text="#000000">


Apparently CGI doesn't provide a mean to expose custom headers. And the headers are meant to be directives for the end or intermediate devices to act upon if they're interested. The application-specific data should go to where the application can get to.

The suggestion at this time:

a) adding this name-value pair as URL params and use Query_String_Decoded to get to this.

b) If the value gets too long, you can do a POST and shove this name-value in to the Http payload. The document context would have this Notes field/value because that's where the application is expected to get it.


Please consider whether to extend the CGI or something else within a NotesAgent in order to read these headers.

  • Attach files