Closed muratulashozturk closed 3 years ago
You should be able to pass objects directly. Code for wampRequest is here: https://github.com/iczero/lol-client-api/blob/master/src/LeagueClientAPI.js#L203
In your example, try
await api.wampRequest('POST /lol-summoner/v1/summoners', { name: 'summonerName' });
It should send
[2, "requestId", "POST /lol-summoner/v1/summoners", { "name": "summonerName" }]
Alright, buddy. I will give it a try today and let you know If It's working or not.
One more thing, please keep in mind this code hasn't been updated for 2 years (a very long time!) as I am no longer currently playing League. Parts of it are likely to not work anymore.
Yeah, no problem with that. I am not playing LoL too nor know it too much haha. I am currently writing a full LCU API wrapper in C#. I figured everything but I was just checking If we can send the HTTP requests with WebSocket. I will give it a try. If It's not working (probably updated), I'm going to look at packets with Fiddler to see what changed. Thanks for the information btw.
Test successful! I tried creating a lobby with WebSocket and it worked.
Hi, it's me again. It's all working but after connecting websocket, When I close the league client, I cannot relaunch again while the terminal is running. If I close the terminal then it's starting to launch. Do you know why this is happening? I tried everything. Closed websocket connection etc but none of them working.
I'm not sure. I don't recall that ever being an issue. Closing the LeagueClientUx window should quit LeagueClient and thus disconnect the websocket client. Upon restart of LeagueClient, the websocket client should simply rediscover the lockfile and reconnect.
Well yeah It is normally what needed to happen but it's the client is not starting unless i close the terminal. Really weird
Hi, I was wondering about how to send JSON with wamprequest.
For example setting name.
HTTP:
So I want to send this request with wamprequest through WebSocket. Should I need to do
? Also will the output
like this?
Thanks.