A single flat 2-inch by 4-inch member may be used … for openings up to 8 feet in width” (R602. 7.4). In essence, the code doesn't require a header unless the end of a floor joist, roof rafter, or truss lands on that wall or there's a concentrated load bearing over the opening.