Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

REST POST Method

JGilly

New Coder
Hello,

I am using a REST http POST method to communicate with a websites API, but I think my endpoint needs to be encoded.

Here is what I have set as my endpoint currently(does not work):


It is supposed to be in the format below (pulled this from the websites API guide):

curl -X POST \
https://rest.testwebsite.com/grant \
-d 'grant_type=authorization_code&client_id=MYAPPCLIENTID&client_secret=MYAPPSECRET

I don't know what the -d means, or how to encode this information and add it to the end of the URL (https://rest.testwebsite.com/grant). Does anyone know what the final URL would look like? Any help is appreciated.
 
Without psychic abilities it will be quite difficult to know what your API is doing.
Post the link to your API
 
Back
Top Bottom