423,846 Members | 1,959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,846 IT Pros & Developers. It's quick & easy.

Webservices

P: 5
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."
}
Attached Images
File Type: jpg apicommander.jpg (64.8 KB, 11 views)
1 Week Ago #1
Share this Question
Share on Google+
7 Replies


Expert 100+
P: 940
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.
1 Week Ago #2

P: 5
Do you know how to set data header
1 Week Ago #3

Expert 100+
P: 940
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.)
1 Week Ago #4

P: 5
I want to same request use through postman tools.is it possible
1 Week Ago #5

Expert 100+
P: 940
Maybe you should read a turorial first?

try: https://steelkiwi.com/blog/api-testi...ial-and-hints/
1 Week Ago #6

P: 5
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
1 Week Ago #7

Expert 100+
P: 940
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.
1 Week Ago #8

Post your reply

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