iphone - ASIFormDataRequest: POST both image/jpeg and application/xml with a -


given both:

nsdata *jpegdata; nsstring *xmlpost: 

how construct asiformdatarequest post both image/jpeg data , applicaton/xml data multipart/mixed post request?

i'm afraid i'm not answering question.

two facts.

  1. the asiformdatarequest class not designed support 'multipart/mixed'. (at least, currently)
  2. xml plain string can sent via multipart/form-data too.

if situation forcing have use multipart/mixed, ignore me. (for instance, client don't want modifying server program support multipart/mixed.)

if not, please think again once. need multipart/mixed itself? no choice? never 'multipart/form-data'? know, server part programmers 'multipart/form-data' more other used format because supported server frameworks. makes life lot easier :)

if want 'regularity' or 'efficiency' or other specials instead of simplicity, should consider other http. benefits of http stability , compatibility. (from it's well-defined specification , long history) important benefits, may not suitable you.

i didn't try 'multipart/mixed'. maybe it's possible has simple way this. kind of hacking job. (enabling feature absent on original design) should painful. it'll easier making own class http specification.

i recommend use multipart/form-data instead of. supported on class design. can assume xml source plain string. can sent via plain post field value.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -