Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Matthias Preuter
MVP
396
Views
2
Comments
Solved
Optional Query parameter in REST Method
Question
One of a Query parameter in my REST API Method is optional, how do i prevent that it is sent in the URL?
Matthias Preuter
MVP
Solution
Matthias Preuter
wrote:
For example the URL can be
https://host.com/method?par1=1&par2=2&par3=3
and
https://host.com/method?par1=1&par3=3
when par2 is empty, the parameter must not be sent.
Already found it,
Set mandatory: false
And Advanced properties:
Default value: empty
Send default value: No
See solution in context
Matthias Preuter
MVP
For example the URL can be
https://host.com/method?par1=1&par2=2&par3=3
and
https://host.com/method?par1=1&par3=3
when par2 is empty, the parameter must not be sent.
1 reply
25 Jun 2015
Show thread
Hide thread
Matthias Preuter
MVP
Solution
Matthias Preuter
wrote:
For example the URL can be
https://host.com/method?par1=1&par2=2&par3=3
and
https://host.com/method?par1=1&par3=3
when par2 is empty, the parameter must not be sent.
Already found it,
Set mandatory: false
And Advanced properties:
Default value: empty
Send default value: No
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...