No inputs found in Swift 4.2

as in the picture i authenticated then send request. But i got error “No inputs found”

No Swift progammers here, but it seems this code JSONencodes all parameters key-value pairs, while only the value of locations should be JSONencoded. So you may want to try JSONencode the locations only and skipping the encoding with JSONEncoding.default.


I tried to encode my dictionary, but i still has error “No inputs found”


here the same error

It still seems the same issue. Do not send JSON encoded parameters, only JSON encode the value of locations. Again, we’re not Swift programmers, but it may only need to be something like:

let parameters = [
"locations": JSONSerialization.data[ <your input> ]
]

And no other further JSON encoding after that. Same in the Online HTTP Post, do not set the content to application.json but rather application/x-www-form-urlencoded.