Back to Problem Solutions forum
Hi! I have a problems with this task. I use Java. When I send token - always I have the same request: "error: No token found"
I tried some various strings:
1aHN2KFKWtFCBe3CBuOzNTkx - error: No token found
token: 1aHN2KFKWtFCBe3CBuOzNTkx - error: No token found
token : 1aHN2KFKWtFCBe3CBuOzNTkx - error: No token found
So I tried several different input, but result the same.
What could be the mistake?
Try with the string "token=whatever"
Hi!
I think Quandray may be correct! Let me elaborate this.
Please check what Content-Type
header you are sending. Instructions probably don't mention this (which should
be fixed), but after some colleagues requests server now allows both text/plain
(which is described in instruction,
I believe) and also application/x-www-form-urlencoded
. So if you send data in one format, but headers are set for
another (e.g. by default), body is not properly parsed and fields are not found.
Sorry for this confusion - I hope I'll update instruction soon :)
Okay. I tried already "token=whatever". The answer was: "Bad token"
I read the forum in search of a similar problem and found this option sending.
I think that I must to change type of content from String to Object.
Yours tasks are very interesting! I hope to solve at least 120 :)
"Bad token" is much better than "No token found". Make sure you are changing "whatever" to your correct token.
Thank you, Quandray! My request was like "token = JZRpZiAwFqVoRd0jMeir0TE4" - with 2 spaces before and after "=".
And now server does'nt answer me for next send:
request: token=JZRpZiAwFqVoRd0jMeir0TE4
answer: secret: 26
request: token=JZRpZiAwFqVoRd0jMeir0TE4&answer=74
answer: null
Ok. I did it :)
For ALL users: Don't use " " (spaces) at the text of send.
Good luck!