-
Notifications
You must be signed in to change notification settings - Fork 68
Allow users to send requests from CMK using POST requests. #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e056395
cd49b5e
0b342b2
4a7d833
5dc7dd9
388154a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -67,6 +67,7 @@ | |||||
VerifyCert bool `ini:"verifycert"` | ||||||
ProfileName string `ini:"profile"` | ||||||
AutoComplete bool `ini:"autocomplete"` | ||||||
PostRequest bool `ini:postrequest` | ||||||
} | ||||||
|
||||||
// Config describes CLI config file and default options | ||||||
|
@@ -151,6 +152,7 @@ | |||||
VerifyCert: true, | ||||||
ProfileName: "localcloud", | ||||||
AutoComplete: true, | ||||||
PostRequest: true, | ||||||
} | ||||||
} | ||||||
|
||||||
|
@@ -282,6 +284,9 @@ | |||||
core.AutoComplete = true | ||||||
core.Output = JSON | ||||||
} | ||||||
if !conf.Section(ini.DEFAULT_SECTION).HasKey("postrequest") { { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kevin-lii check this, build fails |
||||||
core.PostRequest = false | ||||||
} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kevin-lii seems some confusion here, core here is not reflected from the defaultCoreConfig(), and core.PostRequest is false by default. possible to check the conf section has postrequest key and it's value is true, to set core.PostRequest = true? Are you able to verify the GET & POST calls with this change? |
||||||
cfg.Core = core | ||||||
} | ||||||
|
||||||
|
@@ -317,7 +322,7 @@ | |||||
} | ||||||
|
||||||
// LoadProfile loads an existing profile | ||||||
func (c *Config) LoadProfile(name string) { | ||||||
Debug("Trying to load profile: " + name) | ||||||
conf := readConfig(c) | ||||||
section, err := conf.GetSection(name) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build failing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed.