[英]How to post RDF data with appropriate Content-type header using XMLHttpRequest?
With XMLHttpRequest (on Firefox!) I try to post RDF data in turtle or N3 format to a service, but this seems not to be possible. 使用XMLHttpRequest(在Firefox上!),我尝试将乌龟或N3格式的RDF数据发布到服务中,但这似乎是不可能的。 Whenever I issue setRequestHeader( 'Content-type', .....) with either 'application/turtle' or 'text/n3', the post does not reach the service and returns status 0.
每当我用'application / turtle'或'text / n3'发出setRequestHeader('Content-type',.....)时,帖子都不会到达服务并返回状态0。
May it be that this object is definitely restricted to post 'text/plain' or 'application/x-www-form-urlencoded' data only? 可能是该对象绝对仅限于发布“文本/纯文本”或“应用程序/ x-www-form-urlencoded”数据吗?
Only uses GET or POST.
仅使用GET或POST。 If POST is used to send data to the server, the Content-Type of the data sent to the server with the HTTP POST request is one of application/x-www-form-urlencoded, multipart/form-data, or text/plain .
如果使用POST将数据发送到服务器,则通过HTTP POST请求发送到服务器的数据的Content-Type是application / x-www-form-urlencoded,multipart / form-data或text / plain中的一种 。
Source : https://developer.mozilla.org/En/HTTP_access_control 来源: https : //developer.mozilla.org/En/HTTP_access_control
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.