doGet(e) - pathInfo?

313 views
Skip to first unread message

ChiefChippy2

unread,
Oct 6, 2019, 6:33:24 AM10/6/19
to Google Apps Script Community
Hello,
I was messing around with web apps when I made a discovery : 

I entered this URL : ( the id is fake, the real URL works )

To my surprise, it loaded the same page it would load without /index.html

I wondered if there is a way to capture this, and it showed up in the event objects in doGet(e) as pathInfo.

2B64FA68-256B-4503-939E-7B033F73ACAF.jpeg

But for some reason, I checked all the documentation on doGet on google developers, and there is no mention of this. 



Riël Notermans

unread,
Oct 6, 2019, 6:44:15 AM10/6/19
to Google Apps Script Community
Hmm, nice find.

It would return paths like

exec/v1/contacts/insert for example?

Would make nice endpoints that are compatibele with our express routes.

Op zo 6 okt. 2019 12:33 schreef ChiefChippy2 <soloui...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/20daf955-934b-4c63-a614-f4d7af860d3b%40googlegroups.com.

ChiefChippy2

unread,
Oct 6, 2019, 6:59:53 AM10/6/19
to Google Apps Script Community
Yes, although not the exec.

Execution Transcript : 
Logger.log([{parameter={}, contextPath=, contentLength=-1, queryString=, parameters={}, pathInfo=v1/whatever/api}, []]) [0 seconds]


On Sunday, October 6, 2019, Riël Notermans wrote:
Hmm, nice find.

It would return paths like

exec/v1/contacts/insert for example?

Would make nice endpoints that are compatibele with our express routes.

Op zo 6 okt. 2019 12:33 schreef ChiefChippy2 <soloui...@gmail.com>:
Hello,
I was messing around with web apps when I made a discovery : 

I entered this URL : ( the id is fake, the real URL works )

To my surprise, it loaded the same page it would load without /index.html

I wondered if there is a way to capture this, and it showed up in the event objects in doGet(e) as pathInfo.

2B64FA68-256B-4503-939E-7B033F73ACAF.jpeg

But for some reason, I checked all the documentation on doGet on google developers, and there is no mention of this. 



--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.

Trevor Scanlan

unread,
Oct 7, 2019, 8:52:49 AM10/7/19
to google-apps-sc...@googlegroups.com
index is a default file it looks for if there is no /page appended

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.


--
Trevor Scanlan
Technology Assistant
Shenandoah Community School District
304 West Nishna Road
Shenandoah, IA 51601
Reply all
Reply to author
Forward
0 new messages