Hello,
I have designed t his procedure to give the proper response when a specific we request code is given. As you can see it is very long winded, What would be a more efficient way to make this work with less blocks? This procedure works, I would jsut like to learn how it can be made more efficient.
You can try Dictionary block, add all the condions in single global variable as i did and use only one get value for the key… Remaining things blocks will do
In the place of 400 you can use get response code… simple
you can try this also… I believe the response code certainly will exists in this list, This also will give you reduced blocks but must be very cautious
In the place of number you could use get response code
There are multiple ways is there(once you started to involve much more with kodular, just kidding) but it is our choice to use for our convenient… Learning is always better than else…
Thank You All for the different approaches. @dora_paz & @Still-learning I like this dictionary approach, its elegant and using the global variable method I can reuse them in other parts of the program and or projects.
Follow-up,
Ok so taking what I learned yesterday, I designed these blocks. It functions, meaning it will send the http Request, however the response doesn’t show up. Its not immediately obvious to me what I’ve done wrong. I also couldn’t locate the “Do it results”
misplaced the blocks…
your response code is the key of the dictionary… and global alert is the dictionary… pls refer the @dora_paz orry, make changes like this…
misplaced the blocks…
your response code is the key of the dictionary… and global alert is the dictionary… pls refer the @ post
OK some progress,
Running removing the procedure and running this give s a Not found when it should be 200 for OK. The http request is successful but the “global alerts” dictionary never gets checked.
Yes, Dear Moderators and @Kodular please see to this point and take into your consideration…
While using web component, notifier does not work with response code (works well with alpha numeric code but doesnot with numeric)… We didnt see such issue earlier. For the last few days only we are experiencing,May be… I thought i was wrong, but after having experience with this user @Chaka_Hamilton , here by i am confirming and lodging this issue. Please review it…