As for melody, no, rap doesn't have it. Can you whistle rap? No. Granted, there are a few musical lines thrown in from time to time, but a bass line or keyboard riff isn't melody. Since there's no melody, there is no harmony, by definition.
Think about any song...let's say "Stairway to Heaven", just for example. Whistle the parts sung by Robert Plant. That's melody, and the guitar and flute parts are harmony. Obviously, the bass and drums are the rhythm. Now whistle "Ninteenth Nervous Breakdown" by the Stones, "Comfortably Numb" by Pink Floyd, or any other song that comes to mind. What you're whistling is the melody. Now try to whistle "Mama Said Knock You Out" (I choose it only because it is one of the few raps I know the title of). You can't, because there is no melody to whistle. Simply put, rap/hip-hop/crap is not music, it is partial music.
Scouts Out! Cavalry Ho!
I just whistled several rap cuts. Perhaps you're not musically inclined. Man oh man, folks are SHOWING their ignorance on this topic!