Skip to content

Instantly share code, notes, and snippets.

@takahashi-h5
Created May 27, 2019 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takahashi-h5/7baa541bd34f9a9ca5682c8486276dd7 to your computer and use it in GitHub Desktop.
Save takahashi-h5/7baa541bd34f9a9ca5682c8486276dd7 to your computer and use it in GitHub Desktop.
axios.post
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<title>axiosjs</title>
</head>
<body>
<script>
var params = new URLSearchParams();
params.append('id', 100);
params.append('name', 'takahashi');
axios.post("https://uperworld.com/axiosjs/post01.php", params)
.then(ret => alert(ret.data));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment