J2ME是否支持HTTP PUT? [英] Is HTTP PUT supported in J2ME?

查看:92
本文介绍了J2ME是否支持HTTP PUT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到MIDP 2.0 API中有一件奇怪的事情:HttpConnection类apidocs显式引用了方法GET,POST和HEAD,但没有其他方法.这是否意味着不支持它们?

I just noticed a strange thing in MIDP 2.0 API: The HttpConnection class apidocs make explicit references to methods GET, POST and HEAD, but no other methods. Does this mean that they are not supported?

http://java.sun .com/javame/reference/apis/jsr118/javax/microedition/io/HttpConnection.html

我还尝试检查MIDP 2.0规范,但找不到任何确凿的事实.

I also tried checking the MIDP 2.0 spec, but couldn't find any hard facts about this.

我可以在某些手机上尝试一下,但不能全部尝试.有人知道实现MIDP 2.0规范的电话需要支持哪些HTTP方法吗?或寻找支持/不支持的手机方面的任何经验,例如HTTP PUT?

I can give this a try on some phone(s), but can't try them all. Does anyone know which HTTP methods are required to be supported by phones implementing the MIDP 2.0 spec? Or any experience in finding phones that support/don't support e.g. HTTP PUT?

如果不支持PUT,是否有任何(便携式)实施方案?在SocketConnection上实现HTTP?

If PUT is not supported, are there any (portable) workarounds for implementing it? Implement HTTP on top of SocketConnection?

推荐答案

该规范在技术上不支持.我确定有包装器类,但我相信它们会引入自己的错误和解决方法.

It is not technically supported by the spec. I am sure there are wrapper classes but I am sure they would introduce their own set of bugs and work arounds.

写一个简单包装器并不难,编写一个不错的可用的无bug程序会变得更加复杂

Writing a simple wrapper isn't hard, writing a decent usable bug free one is way mmore complicated

这篇关于J2ME是否支持HTTP PUT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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