vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Function HTTPServerRequest.json

Contains the parsed Json for a JSON request.

ref Json json() @property scope return @safe;

A JSON request must have the Content-Type "application/json" or "application/vnd.api+json".

Example

Get the json body when there is no content-type header

assert(createTestHTTPServerRequest(URL("http://localhost/")).json.type == Json.Type.undefined);

Authors

Sönke Ludwig, Jan Krüger, Ilya Shipunov

Copyright

© 2012-2017 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.