Pupix / rift-explorer

🛠 Explore the API of the League of Legends client
MIT License
558 stars 73 forks source link

Body parameter ignored in most of post requests? #18

Closed DjordjeMandic closed 6 years ago

DjordjeMandic commented 6 years ago

Curl:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic hidden' -d 'test123' 'https://127.0.0.1:hidden/lol-game-client-chat/v1/instant-messages'

Request Headers:

{
  "Accept": "application/json"
}

Response Body:

{
  "errorCode": "RPC_ERROR",
  "httpStatus": 400,
  "implementationDetails": {},
  "message": "A value for 'summonerName' is required."
}

Response Code:

400

Response Headers:

{
  "status": "400",
  "access-control-expose-headers": "content-length",
  "cache-control": "no-store",
  "access-control-allow-origin": "https://127.0.0.1:hidden",
  "content-length": "151",
  "vary": "origin",
  "content-type": "application/json"
}

I did enter username but its like i didnt. Is it app bug?

image

DjordjeMandic commented 6 years ago

I also found out that message value param is ignored in POST /lol-game-client-chat/v1/party-messages.

Pupix commented 6 years ago

Hmmm. Yes, some calls seem to be broken. I may have to make a guide on how to enable swagger from the LCU client itself without trying to build the file dynamically because the /help endpoint doesn't seem to have all the data necessary to rebuild the whole thing. Will look at it this weekend.

Pupix commented 6 years ago

Sorry about the delay, I've been in vacantion 🍹 . A new version has been added that fixes all of the request related problems.

Cheers, Pupix.