From 8779acbdcc044dfdd095ef60b6ca6e0b55013bc6 Mon Sep 17 00:00:00 2001 From: Tiago Temporin Date: Mon, 5 Jul 2021 05:38:22 -0300 Subject: [PATCH] docs: add header example --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 575ee75..2846c01 100644 --- a/README.md +++ b/README.md @@ -148,3 +148,36 @@ func main() { log.Println("State: ", result.State) } ``` + +#### Set Header params + +```go + soap.HeaderParams = gosoap.SliceParams{ + xml.StartElement{ + Name: xml.Name{ + Space: "auth", + Local: "Login", + }, + }, + "user", + xml.EndElement{ + Name: xml.Name{ + Space: "auth", + Local: "Login", + }, + }, + xml.StartElement{ + Name: xml.Name{ + Space: "auth", + Local: "Password", + }, + }, + "P@ssw0rd", + xml.EndElement{ + Name: xml.Name{ + Space: "auth", + Local: "Password", + }, + }, + } +```