mirror of
https://github.com/americanexpress/baton.git
synced 2025-03-30 15:08:27 +00:00
Removing restriction on methods
This commit is contained in:
parent
f51c862af3
commit
778d6dc328
15
baton.go
15
baton.go
@ -112,17 +112,12 @@ func (baton *Baton) run() {
|
||||
client = &fasthttp.Client{TLSConfig: tlsConfig}
|
||||
}
|
||||
|
||||
switch baton.configuration.method {
|
||||
case "GET", "POST", "PUT", "DELETE":
|
||||
if baton.configuration.dataFilePath != "" {
|
||||
data, err := ioutil.ReadFile(baton.configuration.dataFilePath)
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
baton.configuration.body = string(data)
|
||||
if baton.configuration.dataFilePath != "" {
|
||||
data, err := ioutil.ReadFile(baton.configuration.dataFilePath)
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
default:
|
||||
log.Fatal("Invalid method specified")
|
||||
baton.configuration.body = string(data)
|
||||
}
|
||||
|
||||
if preloadedRequestsMode {
|
||||
|
Loading…
x
Reference in New Issue
Block a user