Closed williamli80 closed 8 years ago
I like what you are thinking here but we can’t do this. A good rule of thumb when deciding if something can be a GET rather than POST is if everything would continue to work if the client cached the reply, which for logout clearly isn’t the case.
One thing that can be fixed with logout is right now you are required to pass post data like this: ‘{“data”: []}’
It would be nice if we could get rid of that (but still do a post).
What I do to cut down on typing is create a .curlrc file and put all the options in there.
$cat ~/.curlrc
cookie = "/tmp/.cjar" cookie-jar = "/tmp/.cjar”
Thats all I have in mine but you can add the other options too. Check out the curl manpage.
Closing per Brad's comments.
With this patch, we can logout by: curl -c cjar -b cjar -k https://BMC/logout Traditional/json format logout is retained.
Signed-off-by: Nan Li bjlinan@cn.ibm.com
This change is![Reviewable](https://reviewable.io/review_button.svg)