Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get url from context in HTTP trigger #43

Open
horihiro opened this issue Jul 10, 2021 · 0 comments
Open

Cannot get url from context in HTTP trigger #43

horihiro opened this issue Jul 10, 2021 · 0 comments

Comments

@horihiro
Copy link
Collaborator

When trying to access the context.req.url property in an HTTP trigger function, VSCode shows TS error as the following screenshot.

image

As the following documenation says, the req object has url property that means the actual requested URL.
https://docs.microsoft.com/en-us/azure/azure-functions/functions-custom-handlers#examples
image

The url property is defined in the interface HttpRequest but is commented out currently.

// /**
// * Request URL.
// */
// url: string;

This cause the above TS error.

There might be some reasons why this is commented out but I'm not sure.
@anthonychu do you have any concerns if this comment out is removed and the url is defined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant