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

Package not compatible with .NET Client package #4

Open
Ackhuman opened this issue Dec 20, 2022 · 2 comments
Open

Package not compatible with .NET Client package #4

Ackhuman opened this issue Dec 20, 2022 · 2 comments

Comments

@Ackhuman
Copy link

There is an issue with the default function name being "HttpTrigger1". Every other JsReport instance sits the API endpoint at "/api/report", which is how the .NET Client package is configured to work. You simply provide the base URL, which it sets as the BaseUrl property in the internal HttpClient. However, when it sends the request, it always uses "api/report" as the request URL. With the out of the box configuration of the Azure function, the API endpoint will be "/api/HttpTrigger1", which means attempting to use the two together will result in a 404. The default function name should therefore be changed from "HttpTrigger1" to "report" to enable compatibility between the two.

Ackhuman pushed a commit to Ackhuman/jsreport-azure-functions-starter-kit that referenced this issue Dec 20, 2022
@pofider
Copy link
Contributor

pofider commented Dec 20, 2022

Thank you.

But the current function code doesn't return the render response in the same shape as the standard jsreport server, so not sure how this helps. Are you actually able to read the response properly with the .net client after the change?

@Ackhuman
Copy link
Author

Sorry for the late reply. Yes, I had no trouble reading the response using the .NET Client package with no additional changes. Before my change I had just been doing the exact same thing but using the different URL.

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

2 participants