如何使用webservices api物联网设备 [英] How to use webservices api IOT devices

查看:172
本文介绍了如何使用webservices api物联网设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I got a web service API. I know basic knowledge web services. I am trying to test the web service through the postman. but I could not able to succeed. if any have answer please help me. I got sample code nodejs. below I gave web services API. please, anyone, see and how to handle that data.

POST /api/v1/sessions
Date: Wed, 28 Nov 2018 06:22:27 -0000
Content-Type: application/json;charset=utf-8
Content-MD5: wQsVzvcXwtwzoiZ13iAVWA==

{
"password": "sym", 
"username": "sym"
}

they gave their own json commander tools. if I send this request in JSON commander it is giving the proper response.if I use the same request. I tested by the postman.it is not working. and getting this error response also

{
"status" : 400,
"code" : 40001,
"resource" : null,
"properties" : [ ],
"message" : "The Date header is invalid.",
"developerMessage" : "The Date header is invalid. Make sure that a the Date or X-Aah-Date header is set and has a valid format."





我尝试过:



我试图在锁中写一个物联网设备



What I have tried:

I am trying to write a IOT device in lock

推荐答案

正如错误所说,你必须设置正确的标题请求。 Postman使您可以在请求上设置自定义标头。此外,您不应该在公共论坛中显示您的用户名和密码,即使对于某些开发者机器也是如此。
As the error says, you have to set proper header for the requests. Postman enables you to set custom headers on the request. Also, you shouldn't show your username and password in the public forum, even for some developer machine.


如何在邮递员
Monday, 03-December-18 07:41:29 UTC


这篇关于如何使用webservices api物联网设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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