wildcard script path

23 views
Skip to first unread message

dme...@eloquii.com

unread,
Sep 16, 2015, 4:50:08 PM9/16/15
to Webscript.io
I am integrating our website with a 3rd party service called TrustEV. The format for one type of request is /trustev/decision/{caseId} where caseId will be unique for each request. 

Example:
GET /trustev/decision/8836d704-63a2-43e3-be0e-c9219cf8dfb9|f32afad1-1c3b-416d-a5f8-bdd323d6568c

I currently get this response:
Unknown subdomain or script.

Is it possible to set up a script with a wildcard in the path? Such as 
 
Thanks,

Daniel

Steve Marx

unread,
Sep 18, 2015, 11:19:19 AM9/18/15
to dme...@eloquii.com, Webscript.io
Sorry, but this isn't possible.

--
You received this message because you are subscribed to the Google Groups "Webscript.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webscriptio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dme...@eloquii.com

unread,
Sep 18, 2015, 11:27:01 AM9/18/15
to Webscript.io, dme...@eloquii.com
I was actually a little brain dead when I asked the question. I ended up making a POST request to eloquii01.webscript.io/trustev/decision/ and sending JSON with it. Then my script appended the JSON representing the caseId to the http.request URL.

example (for posterity):
Here's the JSON I send to my webscript:
{"caseId":"3d0672d2-0d6b-4417-8cb9-31915b0b4242%7C657e8956-9881-4513-b19b-e69547774213"}

My webscript:
--get the json
parsedJSON = json.parse (request.body)

--send modified request to trustev
local trustevRequest = http.request {
    method = 'GET'
}

--return the response
return trustevRequest.content 

Thanks!

Steve Marx

unread,
Sep 18, 2015, 11:30:07 AM9/18/15
to dme...@eloquii.com, Webscript.io
Ah, good! I didn't realize you had the ability to pick the URL structure.

Reply all
Reply to author
Forward
0 new messages