Missing quotes in generated output for formfield body.
rhalff opened this issue · 2 comments
rhalff commented
I have an api defined like this:
@PostReq(path: '/shoppingcart/add')
Future<List<CartWithProduct>> shoppingcartAddPost(
@AsFormField() String cartId,
@AsFormField() String attributes,
);
But it generates the keys without quotes:
Future<List<CartWithProduct>> shoppingcartAddPost(
String cartId, int productId, String attributes) async {
var req = base.post
.path(basePath)
.path("/shoppingcart/add")
.urlEncodedFormField(cartId, cartId)
.urlEncodedFormField(attributes, attributes);
return req.go(throwOnErr: true).map(decodeList);
}
The correct output should be:
.urlEncodedFormField("cartId", cartId)
.urlEncodedFormField("attributes", attributes);
rhalff commented
Thanks for creating this whole jaguar ecosystem btw, overall it's quite nice to work with.
tejainece commented
Released to pub as 2.8.9
.