URL을 작성하고 경로의 모든 특수 문자가 인코딩되도록 노력하고 있습니다. 현재는이를 수행하지 않았습니다. path
속성이 NSURLComponents
인 방법에 대한 오해로 인한 것일 수 있습니다. 공장. URLPathAllowedCharacterSet이 느낌표를 인코딩하지 않음
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
NSURLQueryItem *queryItem = [NSURLQueryItem queryItemWithName: @"queryName" value: @"queryValue"];
components.queryItems = @[queryItem];
는 // 나는 stringByAddingPercentEncodingWithAllowedCharacters 같은 문자를 인코딩 것이라고 생각했다 "!" "% 21"으로
components.path = [components.path stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]];
는
[items addObject:components.URL];
내가
components.path
근본적으로 뭔가 잘못하고 있는가 인코딩되지 않은,와! ""URL을 돌려줍니다 //?
도움을 주신 모든 분들께 미리 감사드립니다.