From 9539aa6c86ec7e37e7e78d5b048f04899c0b658c Mon Sep 17 00:00:00 2001 From: romangraef Date: Wed, 14 Nov 2018 16:09:01 +0100 Subject: fixed api weirdness --- compile_api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compile_api.py b/compile_api.py index 019df74..bea1de5 100644 --- a/compile_api.py +++ b/compile_api.py @@ -46,12 +46,10 @@ def parse_execute_response(response: dict) -> ExecuteResponse: async def execute(code: str, language: Union[str, int]) -> ExecuteResponse: async with aiohttp.ClientSession() as session: - print(code) - print(language) - response = await session.post(EXECUTE_ENDPOINT, data=get_parameters( + response = await session.get(EXECUTE_ENDPOINT, data=get_parameters( Program=code, LanguageChoice=language, Input="", CompilerArgs="", )) - return parse_execute_response(await response.json()) + return parse_execute_response(await response.json(content_type=None)) -- cgit