Open authorjapps opened 6 years ago
@authorjapps May I work on this?
Yes, sounds good. 👍
Greetings and Welcome, Thanks for your interest in contributing.
Mailing list - Can you please join the mailing list?
Please visit this(2min read) CONTRIBUTION guidelines page
Gitter link acts as QnA forum currently, until we have all members in the mailing-list above(newly created)
Cheers
@authorjapps I apologize for the inconvenience but I am unable to work on this due to other commitments. Please feel free to reassign.
No worries. Thanks for letting us know. 👍
@authorjapps is this issue still relevant? May I work on it?
Hello @oiakinat mate, I have added more details(springboot repo, controller class) to the description now. Yes please, you can kindly pick this.
And thanks for your participation in contributing!
And if you could please join these-
Mailing list - Can you please join the mailing list?
Please visit this(2min read) CONTRIBUTION guidelines page
Gitter link acts as QnA forum
Cheers
@authorjapps Thanks a lot for this great opportunity) I've already done all these instructions and some research with fixes. So, I've figured out that SpringBoot recognize same key from query parameters and HttpEntity as it was described in comments from #141 For example, ZeroCode JSON with these objects
"queryParams": {
"notArray": "notOne"
}, "body": {
"notArray": "notTwo"
}
will be recieved by SpringBoot as {notArray=[notOne, notTwo]}
But I guess it'll be nice, if we could use arrays in "queryParams"
and "body"
,
because now, if we'll try to send something like this
"queryParams": {
"array": ["one", "two"]
}, "body": {
"array": ["three", "four"]
}
SpringBoot will receive {array=[[one, two],[three,four]]}
.
So I've fixed it, and now ZeroCode support multivalue not only for www-urlencoded header.
If it's ok, can I raise a PR? Or if it's not ok - could you please tell where I've got it wrong?
Also, I have to say that in my fix I can't see really good way to control value duplicates, but should we really do this?
Solution sounds great. Thank you. We are only worried if it won't be backward compatible or break anything for our existing users. Because looks like we are changing the earlier contract!
We are reviewing this and will come back here soon. @arunvelusamyd @santhoshTpixler @macrocks @aghorpade @officiallysameer @respondsid
Mixing the parameters in the URL(AKA queryParameters) and the body parameters will introduce more confusion. It is better to have a clear separation between the URL and the body.
I agree, but in my comment using "queryParams" and "body" together, just a demonstration. Of course, they can be used separately - my idea was to give an additional opportunity to use arrays for params both in "queryParams" and in "body".
@authorjapps Hello! I am interested in working on this issue. Is anyone working on this?
@priya1712d , please go ahead and raise a PR for this when ready.
Please have a look here for CONTRIBUTING: https://github.com/authorjapps/zerocode/blob/master/CONTRIBUTING.md
This is a tech-debt ticket. Before implementing, please check if the framework(Apache Http Client) is already taking care of this situation. If not, then implement it and raise a PR. TODO-
Spring boot repo: https://github.com/authorjapps/spring-boot-integration-test
Controller class: https://github.com/authorjapps/spring-boot-integration-test/blob/master/src/main/java/com/springboot/controller/CustomerController.java
Relevant comments from the old ticket: Comment Link: https://github.com/authorjapps/zerocode/issues/141#issuecomment-432700435
That sounds correct. 👍 This will make everyone's life a lot easy now. Postman accepts both as
key-value
and combines them if both are present(shown below).Folks, Let's go with PR review n approval please !
If same key is present, they server receives as multivalue(means client also sends as multi value) - see below:
postman client
spring boot server
@arunvelusamyd , Good job mate ! Have you taken care of the above(same key situation) in your PR ? If not can you please take care now ? 👍
@macrocks , @cooljavadev @nirmalchandra - Please review n approve -or- express your view points if disagree or think any other way 🙏