Platform
Learn
Community
Support
Partner Center
Sign up
or
Log in
logout
Account Settings
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Learn
Training
Documentation
Evaluation Guide
What's New
Community
Home
Forums
Forge
Ideas
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Sign up
or
Log in
Home
Forums
Forge
Ideas
Members
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Forge Discussions
[ardoHTTP] URL Template
Community
›
Forums
›
Forge Discussions
[ardoHTTP] URL Template
New Post
New Post
Forge Component
ardoHTTP
(15)
Published on 2015-06-04 by Ricardo Silva
15 votes
Published on 2015-06-04 by Ricardo Silva
Mário Tomás
Posted on 2015-05-26
Mário Tomás
Rank: #784
Posted on 2015-05-26
Hi,
I am doing a REST integration, but for now it will have to work on platform 7. So i am using new Rest functionalities on platform 9 test it, and replicate on 7 with ardoHTTP and ardoJSON.
My question is about the bahaviour of non mandatory fields and null values.
In Version 9, i can put a input field that will go on an URL as: 'isMandatory: No ; Send Default Value: No' this means that that field will not appear on the url if it has a null value, for instance '0' for a Integer field:
I thought that URLTemplate from ardoHTTP extension could be used for this, but i don't find a way to specify that the field should not be send if it is null. Have we a way to specify this? Thanks
Ricardo Silva
Posted on 2015-05-26
Ricardo Silva
Rank: #2
Posted on 2015-05-26
Solution
The URL Template function follows the
6570 RFC
.
From what I'm reading what you want is this syntax:
http://www.example.com/foo{?query,number}
This will add query and number if they're defined. So in your case you would add the following template:
.../api/v2/{?limit,offset,sync_token,service_ids,calendar_ids,calendar_ids__or} and add the variables to the list whether or not you want them to be shown.
Please let me know if this worked for you :)
Solution
Ricardo Silva
Posted on 2015-05-26
Ricardo Silva
Rank: #2
Posted on 2015-05-26
Solution
You can try it out
here
.
Solution
Mário Tomás
Posted on 2015-05-26
Mário Tomás
Rank: #784
Posted on 2015-05-26
Solution
Thanks for the quick answer.
yes, i could work with this pattern.
I apply an url_template like: /api/v2/events/{?limit,offset,sync_token,service_ids,calendar_ids,calendar_ids__or}
and some if's validating the content of the inputs, to add or not the inputs as Variables.So for instance if limit=0, this input will not go to the list of variables, and will not be included on URL.
Solution
Quick Reply
attachment
Choose File
No file chosen
Submit
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Community Quick Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...