Update vendor directory

This commit is contained in:
Nick Craig-Wood 2016-12-04 16:25:30 +00:00
parent c265f451f2
commit 34b9ac8a5d
54 changed files with 4253 additions and 283 deletions

View file

@ -47,12 +47,22 @@ var BuildHandler = request.NamedHandler{Name: "awssdk.rest.Build", Fn: Build}
func Build(r *request.Request) {
if r.ParamsFilled() {
v := reflect.ValueOf(r.Params).Elem()
buildLocationElements(r, v)
buildLocationElements(r, v, false)
buildBody(r, v)
}
}
func buildLocationElements(r *request.Request, v reflect.Value) {
// BuildAsGET builds the REST component of a service request with the ability to hoist
// data from the body.
func BuildAsGET(r *request.Request) {
if r.ParamsFilled() {
v := reflect.ValueOf(r.Params).Elem()
buildLocationElements(r, v, true)
buildBody(r, v)
}
}
func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bool) {
query := r.HTTPRequest.URL.Query()
for i := 0; i < v.NumField(); i++ {
@ -84,6 +94,10 @@ func buildLocationElements(r *request.Request, v reflect.Value) {
err = buildURI(r.HTTPRequest.URL, m, name)
case "querystring":
err = buildQueryString(query, m, name)
default:
if buildGETQuery {
err = buildQueryString(query, m, name)
}
}
r.Error = err
}