[I] factorise the post and get request with headers