Refine method writable in http.py