Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested query string does not work #11

Open
soroshsabz opened this issue Aug 10, 2023 · 2 comments
Open

Nested query string does not work #11

soroshsabz opened this issue Aug 10, 2023 · 2 comments

Comments

@soroshsabz
Copy link

ITNOA

Hi

Description

I want to convert my below nested request to QueryString but I think ToQueryString does not work properly

            var parameter = new RulesCommandServiceAppendRequest()
            {
                Chain = Chain.INPUT,
                Data = new RuleInputModel()
                {
                    Protocol = "tcp",
                    SourceIp = "2.2.2.2",
                    DestinationIp = "1.1.1.1",
                    SourcePort = "111",
                    DestinationPort = "222",
                    Jump = "DROP"
                }
            };

Actual Behaviour

After I call WebSerializer.ToQueryString(parameter) I see below output:

Chain=INPUT&Data=DestinationIp=1.1.1.1&DestinationPort=222&Jump=DROP&Protocol=tcp&SourceIp=2.2.2.2&SourcePort=111"

Expected Behaviour

I expect my query string is like below:

Chain=INPUT&Data.DestinationIp=1.1.1.1&Data.DestinationPort=222&Data.Jump=DROP&Data.Protocol=tcp&Data.SourceIp=2.2.2.2&Data.SourcePort=111

What can I do?

@soroshsabz
Copy link
Author

maybe related to #3 ?

@soroshsabz
Copy link
Author

soroshsabz commented Aug 10, 2023

I also ask question about this in SQ https://stackoverflow.com/q/76873657/1539100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant