def ping(self, with_method='<STR_LIT:GET>'):
assert with_method in ('<STR_LIT:GET>', '<STR_LIT:POST>')<EOL>if with_method == '<STR_LIT:GET>':<EOL><INDENT>return self.get('<STR_LIT>')<EOL><DEDENT>return self.post('<STR_LIT>')<EOL>
Pings the Syncthing server.

            Args:
                with_method (str): uses a given HTTP method, options are
                    ``GET`` and ``POST``.

            Returns:
                dict