如何将base64编码的图像字符串发送到服务器 [英] how to send base64 encoded string of image to server

查看:69
本文介绍了如何将base64编码的图像字符串发送到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好 在我的项目中,我必须将图像的 BASE64 字符串从小程序发送到 IIS 服务器上的 asp 页面.当我通过 HttpURLConnection 尝试它时,它给出 Exception IllegalArgumentException: invalid character in header message

HI to all In my project I have to send BASE64 string of an image from applet to an asp page which is on IIS Server. When I try it by HttpURLConnection it give Exception IllegalArgumentException: invalid charater in header message

请帮帮我

提前致谢

推荐答案

例如Base64EncoderStream

或示例如何为 HttpURLConnection 认证

conn.setRequestProperty("Proxy-Authorization",
"Basic " + new sun.misc.BASE64Encoder().encode((proxyUser 
+ ":" + proxyPassword).getBytes()));

这篇关于如何将base64编码的图像字符串发送到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆