Skip to content

Commit bfb6198

Browse files
committed
Fixing TriggerFunctionAPIM api for ASP.Net controller
1 parent 51034e2 commit bfb6198

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

AzureFunctions.AngularClient/src/app/function/embedded/embedded-function-test-tab/embedded-function-test-tab.component.ts

-7
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ export class EmbeddedFunctionTestTabComponent implements OnInit, OnChanges, OnDe
141141
});
142142
});
143143

144-
const headers = new Headers();
145-
headers.append('Content-Type', 'application/json');
146-
headers.append('Accept', 'application/json');
147-
headers.append('Cache-Control', 'no-cache');
148-
headers.append('Ocp-Apim-Subscription-Key', `403ca4c30e9d45fba7306a7a4edb5f75`);
149-
headers.append('Ocp-Apim-Trace', 'true');
150-
151144
this._busyManager.setBusy();
152145

153146
const content = {

AzureFunctions.AngularClient/src/app/shared/models/portal-resources.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is auto generated
2-
export class PortalResources
3-
{
2+
3+
export class PortalResources {
44
public static azureFunctions: string = "azureFunctions";
55
public static azureFunctionsRuntime: string = "azureFunctionsRuntime";
66
public static cancel: string = "cancel";
@@ -903,4 +903,4 @@
903903
public static DurableFunctionsOrchestrator_description: string = "DurableFunctionsOrchestrator_description";
904904
public static DurableFunctionsHttpStart_description: string = "DurableFunctionsHttpStart_description";
905905
public static functionsPreviewTitle: string = "functionsPreviewTitle";
906-
}
906+
}

AzureFunctions/Controllers/AzureFunctionsController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public async Task<HttpResponseMessage> TriggerFunctionAPIM(TriggerFunctionModel
166166
{
167167
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
168168
client.DefaultRequestHeaders.Add("Cache-Control", "no-cache");
169-
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "");
169+
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", apimKey);
170170
client.DefaultRequestHeaders.Add("Ocp-Apim-Trace", "true");
171171

172172
var content = new StringContent(request.body, Encoding.UTF8, "application/json");

0 commit comments

Comments
 (0)