You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,7 +33,7 @@ public void ConfigureServices(IServiceCollection services)
33
33
}
34
34
```
35
35
36
-
#### Example Dependency Injection
36
+
#### Example dependency injection
37
37
```csharp
38
38
publicclassTestController : Controller
39
39
{
@@ -52,8 +52,8 @@ public class TestController : Controller
52
52
}
53
53
```
54
54
55
-
#### Add Configuration Section to the appsettings.json file (or your configuration file)
56
-
##### Example for development environment:
55
+
#### Add configuration section to the appsettings.json file (or your configuration file)
56
+
##### Example:
57
57
```json
58
58
"ProxySettings": {
59
59
"RegionKeys": {
@@ -68,6 +68,7 @@ public class TestController : Controller
68
68
69
69
#### API Contract Definition (Default HttpMethod is HttpGet)
70
70
```csharp
71
+
// This APIs expose methods from localhost:5000 and localhost:5001 as configured on ProxySettings
71
72
[ApiRoute("api/[controller]", regionKey:"Main")]
72
73
publicinterfaceIGuidelineApi : IApiContract
73
74
{
@@ -86,7 +87,7 @@ public interface IGuidelineApi : IApiContract
86
87
}
87
88
```
88
89
89
-
### Usage for Backend - Server Side
90
+
### Backend - Server Side
90
91
#### API Contract Implementation
91
92
```csharp
92
93
[Route("api/[controller]")]
@@ -152,6 +153,24 @@ public class GuidelineController : Controller, IGuidelineApi
152
153
}
153
154
```
154
155
156
+
#### Multipart form data:
157
+
Proxy sends all POST methods as JSON but if the method parameter model contains IFormFile type property it converts the content-type to multipart/form-data. In this case, use any model to POST multipart/form-data to API without [FromBody] attribute on action parameter. For example:
0 commit comments