c# - send query string more than two hundred thousand characters in json to api - c # -


i want send jpeg image converted base64 json. image 660kb in size , characters after conversion approximately 2 million in length. need send api ?? in query string, if possible.

the error string long. there alternatives?

        httpclient client = new httpclient();         string uploadjson = "http://mylink/webapi/api/uploadphoto?jsonimage=" + jsonimage + "&idodl=" + idodl + "&sndevice=" + sndevice + "&cod=" + cod + "&idtechnician=" + idtechnician + "&id_producer=" + id_producer + "&pdr=" + pdr;          client.baseaddress = new uri(uploadjson);         client.defaultrequestheaders.accept.clear();         client.defaultrequestheaders.accept.add(new mediatypewithqualityheadervalue("application/json"));          task<httpresponsemessage> response = client.getasync(uploadjson);         httpresponsemessage res = response.result;         if (!res.issuccessstatuscode)         {             console.write("error upload");         } 

what trying impossible.

if @ rfc standard itself, url / querystring lengths cannot long. implementations chop them off around 2k characters , on needs sent via post instead.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -