简体   繁体   English

为什么得到200的响应但没有在使用KAA的端点客户端中显示消息正文

[英]Why get a response of 200 but not showing message body in the endpoint client with KAA

I try with Kaa Sandbox (curl command and UI) for using send notification with Json file. 我尝试使用Kaa Sandbox(curl命令和UI)来使用Json文件发送通知。

My problem is : 我的问题是:

when I using json file why not showing message body in the client endpoint (Notification demo (JAVA SDK) ?! , While I receive 200 responses . 当我使用json文件时为什么不在客户端端点显示消息体(通知演示(JAVA SDK)?), 当我收到200个响应时

Hint: sdk according to related schema. 提示:根据相关架构的sdk。

I found the right solution. 我找到了正确的解决方案。

1- Make sure that your SDK related to schemaId 1-确保您的SDK与schemaId相关

2- Make sure structure of your schema just given an message field: 2-确保给出一个消息字段的架构结构:

{
"type": "record",
"name": "Notification",
"namespace": "org.kaaproject.kaa.schema.example",
"fields": [
    {
        "name": "message",
        "type": "string"
    }
]

} }

3- and your json file : 3-和你的json文件:

{
  "message" : "Hello world!"
}

4- your curl command should be according to related schemaId and topicId and applic the tionId 4-你的curl命令应该根据相关的schemaId和topicId并应用于theId

For show to you: This is my json file: 为了给你看:这是我的json文件: 在此输入图像描述

Then this is response in client: 然后这是客户端的响应:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Java REST 端点返回响应 200 但正文为空白 - Java REST endpoint returning response 200 but the body is blank 得到200个响应,但不显示json值 - Getting 200 response, but not showing json value facebook 内部 API 响应主体的端点包含一个 for 循环,然后是 JSON blob,为什么? - A endpoint of facebooks internal API response body contains a for loop and followed by JSON blob, why? 改造2-响应正文返回null(响应代码为200) - Retrofit 2 - response body returns null (response code is 200) 路由器处理程序返回一个对象数组,但客户端没有在 json 中获取它们,尽管响应状态为 200 - router handler returns an array of object but client doesn't get them in json though response with 200 status 改造call.enqueue代码200,但response.body()为空 - Retrofit call.enqueue code 200, but response.body() is empty Post请求返回空体响应(200-none)python - Post request returns empty body response (200-none) python 在其余客户端的响应正文中看不到响应 - response not viewable in response body in rest client Jtable返回错误,没有消息加载。 响应返回200 - Jtable returns Error without message onload. Response returns 200 如何用API端点的响应主体替换ap标签中的文本? - How to replace text in a p tag with the response body from an API endpoint?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM