aboutsummaryrefslogtreecommitdiff
path: root/example.go
diff options
context:
space:
mode:
Diffstat (limited to 'example.go')
-rw-r--r--example.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/example.go b/example.go
index 1d8747f..3a72fbf 100644
--- a/example.go
+++ b/example.go
@@ -210,6 +210,8 @@ func (ex *Example) registerWebSocketEndpoints() (err error) {
}
func (ex *Example) registerTargetHTTP() (err error) {
+ const headerAuthorization = `Authorization`
+
var targetHTTP = &Target{
ID: `example_http`,
Name: `Example HTTP`,
@@ -219,6 +221,12 @@ func (ex *Example) registerTargetHTTP() (err error) {
Duration: 10 * time.Second,
RatePerSecond: 1,
},
+ Headers: KeyFormInput{
+ headerAuthorization: FormInput{
+ Label: `Authorization`,
+ Hint: `Global authorization header.`,
+ },
+ },
Vars: KeyFormInput{
`A`: FormInput{
Label: `A`,
@@ -235,6 +243,10 @@ func (ex *Example) registerTargetHTTP() (err error) {
Path: pathExample,
RequestType: libhttp.RequestTypeQuery,
Headers: KeyFormInput{
+ headerAuthorization: FormInput{
+ Label: `Authorization`,
+ Hint: `Global authorization header.`,
+ },
`X-Get`: FormInput{
Label: `X-Get`,
Hint: `Custom HTTP header to be send.`,