integrate request builder into HTTP client for googleapis support (#157)
This commit is contained in:
22
builder/body_option.go
Normal file
22
builder/body_option.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package builder
|
||||
|
||||
const (
|
||||
singleWildcard string = "*"
|
||||
doubleWildcard string = "**"
|
||||
)
|
||||
|
||||
type bodyOption string
|
||||
|
||||
func (o bodyOption) String() string { return string(o) }
|
||||
|
||||
func (o bodyOption) isFullBody() bool {
|
||||
return o.String() == singleWildcard
|
||||
}
|
||||
|
||||
func (o bodyOption) isWithoutBody() bool {
|
||||
return o == ""
|
||||
}
|
||||
|
||||
func (o bodyOption) isSingleField() bool {
|
||||
return o != "" && o.String() != singleWildcard
|
||||
}
|
Reference in New Issue
Block a user