A sample backend application made to test the TermiNetwork swift library
Clone the project from GitHub and run the following commands to run the server
$ git clone https://github.com/billp/TermiNetworkBackend
$ cd TermiNetworkBackend
$ bundle
$ rails s
Used to test get/post parametetrs with the given method.
Example call
http://localhost:3000/test_params?foo=bar&my_bool=true
Response
{
"foo": "bar",
"my_bool": "true"
}
Used to test http status code. It returns the given status code in JSON as well as actual HTTP STATUS CODE.
Example call
http://localhost:3000/test_status_code?status_code=404
Response
{
"status_code": "404"
}
It returns all the request headers
Example call
http://localhost:3000/test_headers
Response
{
"status_code": "404"
}
Uploads a file to server and returns a success status. Useful to test the upload progress of big files.
Example call
upload a file with POST as a form-data param with name file["attachment"] at
http://localhost:3000/upload_file
Response
{
"success": true
}
A simple call that returns an empty body.
Example call
http://localhost:3000/test_empty_response
Response: nothing
Response
{
"success": true
}
Returns the params passed encrypted with AES256 ECB. The key is aaaaaaaaaaaaaaaaaaaaaaabcdefg123
Example call
http://localhost:3000/test_encrypt_params?test=abc
Response
{
"data": "/d0/tEv1pAoZaijl1quH2xdR5mP1yKSP8OXL0QGILydGSi7c98spSdqFft00I5UW0oqR9401gRAS40QyleoNqC+ZxFpVnixkrUFlo1OOJPGkzZDp2gCR/2K3CpHZ620c"
}