i am using alamofire to call api. but in this particular api i am getting nil value as a response. actually when i hit my api in my browser its working pretty well.
here is my code
func web()
{
request(.GET, "http://www.horecasupply.nl/AJAX?function=appStructure", parameters: nil, encoding: .JSON).responseJSON { (response : Response<AnyObject, NSError>) -> Void in
if response.result.value != nil {
print(response.result.value)
}
}
}
getting nil value and when i print respose its showing me
Printing description of response.result.Failure:
Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 1."
UserInfo={NSDebugDescription=Invalid value around character 1.}
EDIT 1:: tried responsestring instead of responsejson. but getting different kind of response so how can i convert it?
\r\n\r\n\r\n\r\n</script>\r\n DD_belatedPNG.fix(\'img, .png_bg\'); //fix any or .png_bg background-images </script>\r\n\r\n\r\n</script>\r\n</script>-->\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n")