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

Http POST resource functions can define more than one payload parameters #7512

Open
LakshanWeerasinghe opened this issue Jan 21, 2025 · 0 comments

Comments

@LakshanWeerasinghe
Copy link
Contributor

Description

We should only allow defining only single payload parameter for a single http post resource method definition. But there are two ways that we can define more than one payload parameter for the resource method.

Steps to Reproduce

Case 1:

   resource function post foo(@http:Payload PayloadType payload, @http:Payload PayloadType payload2) {
        do {
        } on fail error err {
            // handle error
        }
    }

Case 2:

    resource function post foo(PayloadType payload, @http:Payload PayloadType payload2) {
        do {
        } on fail error err {
            // handle error
        }
    }

Version

update-11

Environment Details (with versions)

No response

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

No branches or pull requests

1 participant