API 1
Base URL: 'http://www.answerit.ru' Resource: /flaskapi/api/get Method: GET Response: 200 OK 2. Resource: /flaskapi/api/put Method: PUT Response: 200 OK 3. Resource: /flaskapi/api/order/<int:put_id> Method: PUT Response: 200 OK Order with id <put_id> was added to the system. Thank you! 4. Resource: /flaskapi/api/prod_order/<int:prod_order_id> Method: PUT Allowed prod_order_id:[10000;20000] Responses: 200 OK application/json {"Success":"PO with id <int:prod_order_id> created."} Order out of allowed range: 412 Precondition Failed application/json {"Error":"This order value is not allowed"} 5. Resource: /flaskapi/api/multiply_two/ Method: GET Response: 200 OK This endpoint allows to multiply numbers. Use POST method to send two numbers factor_1 and factor_2 of type int or float. format request body as JSON. Response will include info about their product. Method: PUT Parameters: factor_1,factor_2 : float Responses: 200 OK application/json { "Success":"Product of %factor_1% and %factor_2% is %product%" } where %product% = %factor_1% * %factor_2% 412 Precondition Failed if factor_% is not integer or float application/json { "Error 412":"factor_% is not a number" } Method: POST Body: { "factor_1" : float, "factor_2" : float } Responses: 200 OK application/json { "Success":"Product of %factor_1% and %factor_2% is %product%" } where %product% = %factor_1% * %factor_2%
Если 200 не пришло значит мой сайт накрылся. Пишите в комментариях получилось или нет.
Большая просьба - не посылайте слишком много запросов. Я не уверен какую нагрузку
выдержит сайт на моём тарифе.