Skip to content

adityabelgaonkar05/cf-online-fetchapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cf-online-fetchapi

Fetches Codeforces Test Cases from provided link POST your codeforces problem link on 'https://cf-online-fetchapi.onrender.com/test-cases'

Example use-case =>

const [testCases, setTestCases] = useState<Array<[string, string]> | null>(null);

const fetchTestCases = async () => {
        try {
            const response = await fetch('https://cf-online-fetchapi.onrender.com/test-cases', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify({ url })
            });
            const data = await response.json();
            setTestCases([[data.input, data.output]]);
        } catch (error) {
            console.error('Error fetching test cases:', error);
        }
    };

About

Fetches Codeforces Test Cases from provided link

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages