Detect request type