Closed theamazingfedex closed 6 years ago
I ended up getting it to work by using:
_.Get.Url("/endpoint")
.QueryString("relatedCustomerIds[0]", 123)
.QueryString("relatedCustomerIds[1]", 456)
We are currently investigating a way to add lists like these to the query string without specifying the array indices using HttpContext.Request.QueryString.Create(IEnumerable<KeyValuePair<string,StringValues>>);
Currently unable to send an array of items on a query string. Calling
_.Get.Url("/endpoint").QueryString("relatedCustomerIds", 123).QueryString("relatedCustomerIds", 456)
causes onlyrelatedCustomerIds=456
to be appended to the resultant url. This problem could be solved by allowing multiple values per-key, or simply not manipulating the url to split query parameters into theHttpContext.Request.QueryString
dictionary.https://github.com/JasperFx/alba/blob/8f74b9c45420f900a9277a071bfc376be187c6d4/src/Alba/HttpContextExtensions.cs#L24 ^is the where the change would need to be made.