Json RPC错误32600 [英] Json RPC error 32600

查看:982
本文介绍了Json RPC错误32600的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jquery ajax将json rpc请求传递到远程服务器.这是我的json字符串:

I am using jquery ajax to pass json rpc request to remote server. Here is my json string:

{"jsonrpc":"2.0","method":"merchant_check","params":{"hostID":150999,"orderID":107,"amount":"7777","currency":"051","mid":15001038,"tid":15531038,"mtpass":"12345","trxnDetails":""},"id":107}

我收到此错误:

{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Invalid JSON-RPC 2.0 request error (-32600)"}}

我做错了什么?感谢您的帮助.

What am I doing wrong? Thanks for help.

推荐答案

我在使用json-rpc net时遇到了同样的问题.该问题是由content-type标头引起的.默认情况下,我的浏览器将其设置为application/x-www-form-urlencoded,并生成了该错误.将其设置为application/json可以解决我的问题.

I had the same problem using json-rpc net. The problem was caused by the content-type header. By default it was being set to application/x-www-form-urlencoded by my browser and it generated that error. Setting it to application/json fixed my issue.

这篇关于Json RPC错误32600的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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