HandleSpecialURL

Is there any way to determine if /special/ or /api/ was used in a web application?

WebRequest.path only contains everything past /special or /api in the request

thanks

That’s a good one.

It would be a nice feature to have WebRequest.URL as a property which gives the full requested url.
You could make a feature request in feedback for this.

Maybe there is a way to get it by some http header, i’m not sure.

Looking over :

https://en.wikipedia.org/wiki/List_of_HTTP_header_fields

I’m not seeing anything that would work with Request.GetRequestHeader for what I’m looking for.

I’d like to be able to differentiate between special and api for a public/private restful api.

[quote=217905:@Ralph Hargis]Looking over :

I’m not seeing anything that would work with Request.GetRequestHeader for what I’m looking for.

I’d like to be able to differentiate between special and api for a public/private restful api.[/quote]

i understand your problem.

You could however use HandleURL instead of the other one.
http://documentation.xojo.com/index.php/WebApplication.HandleURL

That one gives Request.Path in a full string of the path. this way you can use /private for .HandleURL and /api + /special for HandleSpecialURL

For what it’s worth, HandleUrl does not get requests that would go to HandleSpecialUrl and vice versa, so you could just tack on the url yourself.