PUT Request

3 posts Page 1 of 1
Contributors
User avatar
TADS
VIP - Donator
VIP - Donator
Posts: 45
Joined: Sun Jan 22, 2012 9:06 pm

PUT Request
TADS
Good Afternooon all,

Please can someone give me a example of a PUT request? i have seen a couple online but i can not seam to get any to work.... I am trying to create some app for my live streaming channel, below is what i am trying to use PUT for.

Here is the DEV link to the API: https://dev.streamelements.com

So the URL would be: https://api.streamelements.com/kappa/v2

the PUT i need is the following
Code: Select all
/points/{channel}/{user}/{amount}

Media type: application/json
so i understand the url in full if it was a get:
https://api.streamelements.com/kappa/v2/points/channe id removed/tads_gaming

That gives me my points on a selected channel but to add or remove points it has to be a PUT and i have no idea on how to use it, so if anyone could give me some example of the above i could learn from it and do all the other requests myself

Many Thanks for your time

Kev (TADS)

PS: glad to be back!
Oval Racer Series Games - https://ovalgames.co.uk/
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Re: PUT Request
CodenStuff
I would try using CURL in PHP to do this. It is quite simple to understand and use and should do what you need.

I'm unable to go into detail with this at the moment due to being out and about but I'll be home soon if you need help. Until then I think sitepoint has a good tutorial on this:

https://www.sitepoint.com/using-curl-fo ... -requests/

Hope this helps :)
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
TADS
VIP - Donator
VIP - Donator
Posts: 45
Joined: Sun Jan 22, 2012 9:06 pm

Re: PUT Request
TADS
Sorry i didn't reply sooner... yes i did work it out in the end, it was user error on my part... i didn't use the auth key i had that is why i was getting a null response.

TADS
Oval Racer Series Games - https://ovalgames.co.uk/
3 posts Page 1 of 1
Return to “Help & Support”