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
Copy file name to clipboardExpand all lines: docs/source/nuget/packages.rst
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,69 @@ And like this for Http API::
264
264
}
265
265
}
266
266
267
+
Voxel.MiddyNet.HttpJsonBodyParser
268
+
---------------------------------
269
+
This package contains a middleware that parse JSON object mapping to a explicit type. There are two versions avalaible:
270
+
271
+
* One for REST Api (APIGatewayProxyRequest and APIGatewayProxyResponse).
272
+
* And another for Http Api (APIGatewayHttpApiV2ProxyRequest and APIGatewayHttpApiV2ProxyResponse).
273
+
274
+
Configuration
275
+
^^^^^^^^^^^^^
276
+
When you use the middleware, must put the specific type to convert JSON, then the middleware adds a object under context.AdditionalContext with the key "body". To access to the typed object you must do a casting of context["body"] with the custom type.
277
+
278
+
Sample code
279
+
^^^^^^^^^^^
280
+
A typical use of the middelware will look like this for Rest API::
281
+
282
+
public class MySample : MiddyNet<APIGatewayProxyRequest, APIGatewayProxyResponse>
0 commit comments