using curl instead of GET