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
Post a Comment