我想弄清楚如何在后台执行PUT请求,并在URL中使用基本64图像和一些其他参数。如何在URL中使用base64图像进行POST
这是我使用的代码:
NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"mywebservice/api/appearances/%@?name=%@&fontsize=%@&logo=%@&active=%@",app.id,app.name,app.fontsize,[app.logoimage base64EncodedString],app.active]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:30.0];
NSLog(@"de url ziet er zo uit: %@", URL);
[request setHTTPMethod:@"PUT"];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[connection start];
当我通过它的工作原理很短的随机字符串代替长基底64图像串。
任何人知道可能是什么原因?
谢谢!
呈现的网址:http://cl.ly/0j2p1R2Q0w36
你试过多部分吗? –