This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Springframework HTTP: Rest Client, The grant type was not specified in the request  RSS feed

 
Greenhorn
Posts: 2
Fedora Postgres Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Hi guys need help, I'm having problem with "grant_type", it says {"error":"invalid_request","error_description":"The grant type was not specified in the request"}.

---------------------------------------------------------------------------------------------------------------------------------output-----------------------------------------------------------------------
14:37:57.849 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Request access token

{Accept=[application/json], Content-Type=[application/x-www-form-urlencoded], Authorization=[Basic eC1wbS1sb2NhbC1jbGllbnQ6MTc5YWQ0NWM2Y2UyY2I5N2NmMTAyOWUyMTIwNDZlODE=]}
14:37:58.154 [main] DEBUG org.springframework.web.client.RestTemplate - Created POST request for "http://192.168.56.13/dfademo/oauth2/token?grant_type=password&username=admin&passwor[color=red] d=admin[/color]"
14:37:58.156 [main] DEBUG org.springframework.web.client.RestTemplate - Setting request Accept header to [text/plain, application/xml, text/xml, application/json, application/*+xml, application/*+json, */*]
14:37:58.439 [main] DEBUG org.springframework.web.client.RestTemplate - POST request for "http://192.168.56.13/dfademo/oauth2/token?grant_type=password&username=admin&password=admin" resulted in 400 (Bad Request); invoking error handler
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - 400
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - 400 Bad Request
14:37:58.443 [main] ERROR com.processmaker.oauth2.details.Oauth2Config - {"error":"invalid_request","error_description":"The grant type was not specified in the request"}
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Content-type = application/json
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - Authorization = null
14:37:58.443 [main] INFO com.processmaker.oauth2.details.Oauth2Config - grant_type = null

The Authorization is null and Grant_type is also null, but i already specify it in the POST request...

Best Regards
stackoverflow.PNG
[Thumbnail for stackoverflow.PNG]
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!