-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Description
Thanks for the great library!
Is it possible to convert the body of a Request to a dictionary when responding to a POST request?
using HTTP
function handle_post(req::Request, rep::Response)
String(take!(req)) # convert to Dict here
return rep::Response
end
server = HTTP.Server(handle_post)
tsk = @async HTTP.serve(server, ip"0.0.0.0", 5000, verbose=true)
sleep(2)
r = HTTP.post("http://0.0.0.0:5000", body=Dict("amount"=> 1000))
Metadata
Metadata
Assignees
Labels
No labels