add export function thanks to a POST method - write the data in a .txt