Sending a JSON to local service, but it does not receive it, why?
let config = try Config()
try config.setup()
let drop = try Droplet(config)
try drop.setup()
drop.get(handler: {req in
if req.json != nil {
print("ass")
print(req.json!)
}
return "almaG"
})
You're sending a GET request with a body. Try sending a POST instead and use drop.post().