Added .trim in JS to remove whitespace around body and url