projects

sandbox-net

https://stackoverflow.com/a/13187820/1766716

โญ Canonical โ€” this is the single source of truth for this project.

Overview

Field Value
Name sandbox-net
Tier ๐Ÿ—„๏ธ Archive
Description https://stackoverflow.com/a/13187820/1766716
Visibility ๐Ÿ”’ Private
Fork No
Last activity ย 
Status โœ… Archived
Original source Github
Original owner guneysus
Language C#
Type Web App (ASP.NET)
Size Large
Idea .NET code sandbox for quick prototyping
Idea score Multi
Impl score Multi
Rating Multi

๐Ÿ’ก Core Idea

benchmarks ===========

๐Ÿ” Code Snippet

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>cancellation</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js" integrity="sha256-T/f7Sju1ZfNNfBh7skWn0idlCBcI3RwdLSS4/I7NQKQ=" crossorigin="anonymous"></script>
    <script>

        const CancelToken = axios.CancelToken;
        var source = CancelToken.source();

        var sendRequest = function () {
            document.getElementById("btnSubmit").disabled = true;
            document.getElementById("btnCancel").disabled = false;

            axios.get('/slowtest', {
                cancelToken: source.token
            }).catch(function (thrown) {
                if (axios.isCancel(thrown)) {
                    document.getElementById("btnSubmit").disabled = false;
                    document.getElementById("btnCancel").disabled = true;
                    source = CancelToken.source();

                    console.warn('Request canceled', thrown.message);
                } else {

Archive Origins


โ† Sandbox server โ†’

Generated by scripts/generate.py ยท Back to index