As it is passed in the URL and not as a POST argument, you should URL-encode your noteWeight.text
string, like this:
str = [str stringByAppendingFormat:@"InsertNewWeight/%@", [noteWeight.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
The spaces will be sent as %20
, and other special characters will also be encoded to be correctly read on the server-side.