diff options
Diffstat (limited to 'example.go')
| -rw-r--r-- | example.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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.`, |
