Api
Request
POST https://calctool.de/Math
Headers
Header |
Value |
Content-Type |
application/json |
Accept |
application/json |
Body
Parameter |
Type |
Description |
command |
String |
Mathematical expression |
session |
int |
Session id |
Response
Headers
Status Code |
Description |
200 |
OK – Successful HTTP request |
Header |
Value |
Content-Type |
application/json |
Body
Parameter |
Type |
Description |
status |
String |
Mathematical expression |
result |
array |
Array of results |
text |
string |
response of matematical expression |
image64 |
base64 coded image |
response of matematical expression |
Errors
Status Code |
Description |
500 |
Internal Server Error – A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. |
Examples
curl
cat simple.json
{
"command" : "1+1",
"session" : "12345"
}
curl -X POST -d @simple.json https://calctool.de/Math
jquery
$.ajax({
type : 'POST',
contentType : 'application/json',
url : '/Math',
dataType : "json",
data : JSON.stringify({
"command" : "1+1",
"session" : "12345"
}),
dataType : "json",
success : function(data) {
alert('data; ' + JSON.stringify(data));
}
});