Search code examples
javascripttypescriptdeno

What is the equivalent of $_SERVER["REQUEST_URI"] in Deno?


I am new to Deno and I was wondering what the equivalent variable of the PHP variable $_SERVER["REQUEST_URI"] would be?

I tried countless functions which were returned as "not a function".


Solution

  • Deno has a couple of different web server APIs (and then there are frameworks built on top of them). But I think most (all?) of them provide the handler with a Request object, which has a url property telling you what the requested URL was.