@JAPNAM SINGH I will suggest to debug or log the value for individual parameter that you are using to build the URI and see if any of the parameter (i.e. graphendpoint etc.) is coming null or empty while retrieving the value. As per the error the parameter url
is not correctly formed and while executing httpClient.GetAsync(url)
it throws exception.
If you are getting the value from configuration of your function app. Please make sure that you have define the application setting and value on your function app.
azure functions "An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set."
JAPNAM SINGH
81
Reputation points
Hi,
I am getting the error when I publish the azure function, locally it does not complain the URI The error message is "An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set."
var driveitempath =graphendpoint + "/sites/" + Environment.GetEnvironmentVariable("pdf:SiteId") + "/drive/items";
string url = drivesitempath + "/" + fileId + "/content?format=pdf"
httpClient.GetAsync(url);
So, if I hard-code the url it works ,but I am trying to achieve no hard-coded values.
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,932 questions
Accepted answer
-
MayankBargali-MSFT 70,941 Reputation points Moderator
2021-07-27T06:36:02.74+00:00