Skip to content

Commit 11b6b6d

Browse files
fixed login
1 parent 4b8a64a commit 11b6b6d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

azkaban/azkaban.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func ConnectWithUsernameAndPassword(u string, username string, password string)
3232
}
3333

3434
form := url.Values{}
35+
form.Add("action", "login")
3536
form.Add("username", username)
3637
form.Add("password", password)
3738

@@ -41,10 +42,6 @@ func ConnectWithUsernameAndPassword(u string, username string, password string)
4142
}
4243

4344
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
44-
req.Header.Set("X-Requested-With", "XMLHttpRequest")
45-
q := req.URL.Query()
46-
q.Add("action", "login")
47-
req.URL.RawQuery = q.Encode()
4845

4946
resp, err := client.Do(req)
5047
if err != nil {

0 commit comments

Comments
 (0)