Use two separate curl instances for submit and get and use separate threads for each to prevent one blocking the other.