471,621 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,621 software developers and data experts.

Webservices

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.

Expand|Select|Wrap|Line Numbers
  1.  POST /api/v1/sessions
  2. Date: Wed, 28 Nov 2018 06:22:27 -0000
  3. Content-Type: application/json;charset=utf-8
  4. Content-MD5: wQsVzvcXwtwzoiZ13iAVWA==
  5.  
  6. {
  7.     "password": "sym", 
  8.     "username": "sym"
  9. }
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

Expand|Select|Wrap|Line Numbers
  1. {
  2.   "status" : 400,
  3.   "code" : 40001,
  4.   "resource" : null,
  5.   "properties" : [ ],
  6.   "message" : "The Date header is invalid.",
  7.   "developerMessage" : "The Date header is invalid. Make sure that a the Date or X-Aah-Date header is set and has a valid format."
  8. }
Attached Images
File Type: jpg apicommander.jpg (64.8 KB, 151 views)
Nov 30 '18 #1
9 31272
Luuk
1,047 Expert 1GB
You should read the error message, and try to understand what is meant with that.

Especially the line: "The Date header is invalid ..."


P.S. Its meaning is that the header (the one with 'Date:....') has an invalid date.
Nov 30 '18 #2
Do you know how to set data header
Dec 1 '18 #3
Luuk
1,047 Expert 1GB
Do you have more info on which tool you are using? I do not know a tool called 'Jason Commander' (from the image you posted.)
Dec 1 '18 #4
I want to same request use through postman tools.is it possible
Dec 1 '18 #5
Luuk
1,047 Expert 1GB
Maybe you should read a turorial first?

try: https://steelkiwi.com/blog/api-testi...ial-and-hints/
Dec 1 '18 #6
My Date format wrong order. I want this format date and time Monday, 03-December-18 07:41:29 UTC.. how to do postman. Postman time zone time differ. I need this time zone. anyone can help me
Dec 3 '18 #7
Luuk
1,047 Expert 1GB
The valid options for this Date in het header of an HTTP message are described in some RFC's.

Chapter 14.8 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)
The Date general-header field represents the date and time at which the message was originated, having the same semantics as orig-date in RFC 822. The field value is an HTTP-date, as described in section 3.3.1; it MUST be sent in RFC 1123 [8]-date format.
Date = "Date" ":" HTTP-date
An example is
Date: Tue, 15 Nov 1994 08:12:31 GMT


chapter 5.2.14 (https://tools.ietf.org/html/rfc1123#page-55)



That's why you should not change the date format wich is used in the header of a HTTP message.
Dec 6 '18 #8
vinibarr
1 Bit
Today is 2022-Jan-03; i have the same problem... there is any solution, please ?
Jan 4 '22 #9
Mia White
11 Byte
hey,
thanks for this, this was really helpful. since i was facing something similar.
Mar 31 '22 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Erik P. Vinther | last post: by
8 posts views Thread by Allan Ebdrup | last post: by
1 post views Thread by Diffident | last post: by
5 posts views Thread by cyberstrike | last post: by
2 posts views Thread by Antuane | last post: by
1 post views Thread by Mike | last post: by
8 posts views Thread by Komandur Kannan | last post: by
5 posts views Thread by ChrisM | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.