#1
I have a method named load_comments() which is something Like this

Now i need to send a request to that endpoint from javascript but i get an error of argument count error. Which means i cant load www.myWebsite.com/store/load_comments/abcde/12.

Just for an example. So my question is how do i solve it?
#2
Hi Mayex,

I think you are confusing yourself and the best place to learn this is in the docs > https://trongate.io/docs/information/reading-values-from-the-url

Your code with a bit of modification will work using segment(x)

using this URL: http://localhost/app_name/store/load_comments/abcde/12
the result:
#3
Alright thanks. I didn't know the segment() could be used to check more than 3 segments.

Thanks!!!
#4
No probs Mayex, happy to help.

Could you please close off the thread if you think you have received the correct answer