Hi,
i have a weird bug.
at
- (AFHTTPRequestOperation *)HTTPRequestOperationWithHTTPMethod:(NSString *)method
URLString:(NSString *)URLString
parameters:(id)parameters
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure
the URLString is already set but in the next method which is called here
[self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
the URLString is nil. But i don't know why?
Any help or idea for this issue?
Thanks
Can you post example code demonstrating the problem? Also, what version of AFNetworking are you using?
URLString is converted under the hood using:
[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString]
If that method returns nil, you would end up with a nil string. Confirm your string is a valid URL String.
:beers:
I have also encountered this error, however, I found my URL add a space
@kcharwood you're totally right. thanks.
I have also encountered this error, however, I found my URL add a space
Your answer solves my problem!
"https://lconfig.xxx" <-> " https://lconfig.xxx"
Most helpful comment
I have also encountered this error, however, I found my URL add a space