Jaagrav / CodeX-API

The new version of CodeX API with it's backend, a lot of you wanted me to make the backend opensource, now it's ready to receive contributions from you. Thanks for being patient, more languages coming soon, happy hacking!

Home Page:https://codex.jaagrav.in/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation in Java

Aleksov2020 opened this issue · comments

private JSONObject getCompileResult(String code, String input, String language) throws UnirestException { Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://codex-api.herokuapp.com") .header("Content-Type", "application/x-www-form-urlencoded") .field("code", code) .field("language", language) .field("input", input==null ? "" : input) .asString(); return new JSONObject(response.getBody()); }

How is that an issue? its not leetcode discussions.