Fix issue using GET instead of POST with thanks to MathieuLescure.