Wouldn’t it be easier to put the http:JSONEncode(tablee)
part into the module? You could check if the value is a table with type()
, and if it is encode it within the module.
True, but it’s just more unnecessary code.
Not really, for me it would be easier having the module encoding the table instead of the script itself.
I’m not saying it’s hard, it’s literally 2 lines of code but what difference does it make, you are still calling the http service regardless if it’s in the module or not. The efficiency bonus aren’t going to be that significant to a point where it makes sense to make them
I have tested it and it doesn’t break, it just returns error. I think the data being passed in the URL makes it type safe anyways