azure-functions-java-worker icon indicating copy to clipboard operation
azure-functions-java-worker copied to clipboard

Example code needed for returning static HTML

Open JonathanGiles opened this issue 7 years ago • 2 comments

Sample code demonstrating how to return static HTML in the body of a http response, that is correctly displayed in an HTML browser, would be very useful to have available.

JonathanGiles avatar Mar 20 '18 02:03 JonathanGiles

I personally like raw code samples as close as possible to the codebase. But what's the canonical structure for samples? A separate repository under Azure-Samples I'm assuming.

Instead of spreading our examples all over the place, we make a public azure-functions-java repo public under Azure-Samples or directly in this repo?

kevinhillinger avatar Mar 22 '18 19:03 kevinhillinger

For me it depends on the scale of the sample. Is the sample code literally showing how to use the API, or is it showing a slightly more developed use case? I recently did a PR into functions that did have code samples in the JavaDoc, but there were simple (see for yourself here: https://github.com/Azure/azure-functions-java-worker/pull/72/files).

For a sample like the html one requested by me in this issue, the recommended advice is to have an azure-samples organisation repo for azure-functions-java or similar, and put all code samples into there.

JonathanGiles avatar Mar 27 '18 21:03 JonathanGiles

Azure functions java samples that cover various use cases can be found in this repository. azure-functions-samples-java

shreyas-gopalakrishna avatar Jan 18 '23 05:01 shreyas-gopalakrishna