Commit aadda8cc authored by Łukasz Nowak's avatar Łukasz Nowak

Follow the updated specification.

In order to create subresource of /path/ it is required to use POST not PUT.


parent 4fa8a2e5
......@@ -24,11 +24,11 @@ from config import NetworkcacheConfiguration, NetworkcacheParser
app = Flask(__name__)
@app.route('/', methods=['PUT'])
def put():
@app.route('/', methods=['POST'])
def post():
""" Save the file on the cache server. """
if getattr(request, 'data', None) is None:
abort(400, 'PUT requires data.')
abort(400, 'POST requires data.')
cache_base_folder = app.config.get('CACHE_BASE_FOLDER')
file_name = hashlib.sha512(
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment