Access HTTP request and response headers for a service

To access HTTP headers exchanged between the Genero client and a web service, you must use following records in the binding section :
  • one record called Request in order to customize HTTP headers to be sent to a web service
  • one record called Response in order to retrieve all HTTP headers returned by a web service
TYPE tGlobalEndpointWithHttpLayerType RECORD # End point
  Address RECORD # Address
    Uri STRING # URI
  END RECORD,
  Binding RECORD # Binding
    Version STRING, # HTTP Version (1.0 or 1.1)
    Cookie STRING,	# Cookie to be set
    Request RECORD
      Headers DYNAMIC ARRAY OF RECORD # HTTP Headers
        Name   STRING,
        Value  STRING
    END RECORD,
    Response RECORD
      Headers DYNAMIC ARRAY OF RECORD # HTTP Headers
        Name   STRING,
        Value  STRING
    END RECORD,       
    ConnectionTimeout INTEGER,# Connection timeout
    ReadWriteTimeout INTEGER # Read write timeout
    CompressRequest  STRING # HTTP compression mode (gzip or deflate)
  END RECORD
END RECORD

Description of additional Request and Response variables:

  • Binding.Request.Headers: Represents the additional HTTP headers to be sent to the web service. (Notice that client stub headers will replace user ones if the same name).
  • Binding.Response.Headers: Represents the HTTP headers returned by a web service.