I am trying to use to accept repository invitations. https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation
It says to send a Patch, but in my case I can only send a POST (my client framework can’t support sending PATCH). I have tried to use a POST method and then set X-HTTP-Method-Override
to PATCH
but that didn’t seem to work. Does anyone know if github api supports X-HTTP-Method-Override?
According to this: https://developer.github.com/v3/#http-verbs I should be able to send a POST instead of a patch, but that doesn’t seem to work for accepting a repo invitation. But perhaps I’m not sending my POST right. Should it have a body or just a URL only?
I’ve tried to send a POST with a json body like this
curl -u user:token -d '{"invitation\_id":"26497928"}' -H "Content-Type: application/json" -X POST [https://api.github.com/user/repository\_invitations](https://api.github.com/user/repository_invitations)
But that returns a 404
{
"message": "Not Found",
"documentation\_url": "[https://developer.github.com/v3](https://developer.github.com/v3)"
}
Then when I tried a POST with just URL only, no data
curl -u user:token -X POST [https://api.github.com/user/repository\_invitations/26497928](https://api.github.com/user/repository_invitations/26497928)
It doesn’t work either. I hope there is a Gandolf out there has the knows how to say friend in Elvish to get me through this door.