Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get host url in azure function in queue trigger as input?

I have input as queue trigger as below:

    [FunctionName("Test")]
    public static void Run([QueueTrigger("myqueue-items")]string myQueueItem, TraceWriter log)
    {
       //code
    }

I want to get host url of azure function inside above function, is there any way to get it?

like image 296
Borad Akash Avatar asked Dec 04 '22 20:12

Borad Akash


1 Answers

You can get the host name by

Environment.GetEnvironmentVariable("WEBSITE_HOSTNAME")
like image 183
Mikhail Shilkov Avatar answered Dec 27 '22 06:12

Mikhail Shilkov