Reputation: 2344
I am trying to send certain parameters in the request body while making a NSURLConnection
.
One of the parameter is base64
encoded.
this is the parameter -
"GZ3m8ImhowVFr01Jf0UAwUWgJ3MvNYgDmkb0x2cOauw/rwLsPanFIHb6xigvi2WR/z47OOOk8Ur+ ev8U2DI5ThDyNZtjfYyMRql7l6DJ9qlNlftwe7bX6qIzkstUBTI5xor9CBYh19lAkc5I207eZAwZ arR85hynWJ9IVM/dQ5TNyjLJy5lABBATkWhdGfwi+0VxYyY7iMYjq+Iq1jkizPN1bKgLCJ0duvPz z003PNQI5oJHuX3zUn3dYl7czUVOwMhJE4SJ7f3U7YuPWJIKfEPaN69h8FsGQRL/+kTx/SdedeiG /Q4I49duSV9apDrWKX+LGaJsr9nCQ9L+ZGbRFg=="
I don't think its very huge. Or is it?
My request fails every time. It says "Client closed connection before receiving entire response". "500 Internal Server Error"
Is the base64
paramater causing the problem.
The method type is 'GET
', does NSURLConnection
allows base64
encoded objects to be sent with the body?
Upvotes: 0
Views: 343
Reputation: 2032
Base64 has nothing in common to your connection issues. Not to GET nor POST. Base64 is a huge string ( I guess ASCII, but not sure ), and it is transmitted through get or post like a regular string. Your problem COULD be as follows: you use GET, and try to send an extra-huge Base64 string, which cannot be sent via GET, due to its huge size (as I remember, GET should be used also for non-huge string requests).
Your option: use POST. So you will be able so send huge amount of data as parameter values.
Upvotes: 1