Changed curl request to URL encode text strings.