|
1 | 1 |
|
2 |
| -Please provide a succinct description of the issue. |
| 2 | +<!-- |
| 3 | +Please provide a succinct description of the issue. Please make an effort to fill in the all the sections below or we may close your issue for being low quality. |
| 4 | +--> |
| 5 | + |
| 6 | +#### Investigative information |
| 7 | + |
| 8 | +Please provide the following: |
| 9 | + |
| 10 | +- Timestamp: |
| 11 | +- Function App name: |
| 12 | +- Function name(s) (as appropriate): |
| 13 | +- Invocation ID: |
| 14 | +- Region: |
| 15 | + |
| 16 | +<!-- |
| 17 | +If you don't want to share your Function App name or Functions names on GitHub, please be sure to provide your Invocation ID, Timestamp, and Region - we can use this to look up your Function App/Function. Provide an invocation id per Function. See the [wiki](https://github.com/Azure/azure-webjobs-sdk-script/wiki/Sharing-Your-Function-App-name-privately) for more details. |
| 18 | +--> |
3 | 19 |
|
4 | 20 | #### Repro steps
|
5 | 21 |
|
6 |
| -Provide the steps required to reproduce the problem |
| 22 | +Provide the steps required to reproduce the problem: |
7 | 23 |
|
8 |
| -1. Step A |
| 24 | +<!-- |
| 25 | +Example: |
9 | 26 |
|
| 27 | +1. Step A |
10 | 28 | 2. Step B
|
| 29 | +--> |
11 | 30 |
|
12 | 31 | #### Expected behavior
|
13 | 32 |
|
14 | 33 | Provide a description of the expected behavior.
|
15 | 34 |
|
| 35 | +<!-- |
| 36 | +Example: |
| 37 | +
|
| 38 | + - After I perform step B, the lights in the house should turn off. |
| 39 | +--> |
| 40 | + |
16 | 41 | #### Actual behavior
|
17 | 42 |
|
18 |
| -Provide a description of the actual behavior observed. |
| 43 | +Provide a description of the actual behavior observed. |
| 44 | + |
| 45 | +<!-- |
| 46 | +Example: |
| 47 | +
|
| 48 | +- Step B actually causes my cat to meow for some reason. |
| 49 | +--> |
19 | 50 |
|
20 | 51 | #### Known workarounds
|
21 | 52 |
|
22 | 53 | Provide a description of any known workarounds.
|
23 | 54 |
|
| 55 | +<!-- |
| 56 | +Example: |
| 57 | +
|
| 58 | +- Turn off the circuit breaker for the lights. |
| 59 | +--> |
| 60 | + |
24 | 61 | #### Related information
|
25 | 62 |
|
26 | 63 | Provide any related information
|
27 | 64 |
|
28 | 65 | * Programming language used
|
29 | 66 | * Links to source
|
| 67 | +* Bindings used |
| 68 | +<!-- Uncomment this if you want to include your source (wrap it in details to make browsing easier) |
| 69 | +<details> |
| 70 | +<summary>Source</summary> |
| 71 | +
|
| 72 | +```csharp |
| 73 | +public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.AuthLevelValue, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log) |
| 74 | +{ |
| 75 | + log.Info("C# HTTP trigger function processed a request."); |
| 76 | +
|
| 77 | + // parse query parameter |
| 78 | + string name = req.GetQueryNameValuePairs() |
| 79 | + .FirstOrDefault(q => string.Compare(q.Key, "name", true) == 0) |
| 80 | + .Value; |
| 81 | +
|
| 82 | + // Get request body |
| 83 | + dynamic data = await req.Content.ReadAsAsync<object>(); |
| 84 | +
|
| 85 | + // Set name to query string or body data |
| 86 | + name = name ?? data?.name; |
30 | 87 |
|
| 88 | + return name == null |
| 89 | + ? req.CreateResponse(HttpStatusCode.BadRequest, "Please pass a name on the query string or in the request body") |
| 90 | + : req.CreateResponse(HttpStatusCode.OK, "Hello " + name); |
| 91 | +} |
| 92 | +``` |
| 93 | +</details> |
| 94 | +--> |
0 commit comments