How to
(1) define the JSON payload
(2) using a multiline string
(3) specify the http header fields such as "Content-Type"
(4) send the POST request with the JSON data
(5) receive the response from the server and print it on screen
(6) in the D programming language
(7) how to compile and run
here is a generic JSON POST request in D; the raw multiline JSON is enclosed in single quotes ', code to be saved in a text file such as test.d:
on linux, compile like this:
run like this: