GoSublime
GoSublime copied to clipboard
Posting to go playground results in wrong method error
When I use the feature to post on the playground, the console shows the following error:
[ `share` | done ]
Unexpected http status: 405 Method Not Allowed
http://play.golang.org/p/Requires POST
looks like this is not caused by the original request, which is clearly a POST. this is when GoSublime tries to follow the returned link to the shared content - evident by the /p/ in the url. I did some experimenting with curl, and I can post content, but I am not getting the content identifier (the stuff that should be after the /p/ in a correct playground share link in the body returned from the original POST request. dunno if this is a playground api change..
I think it's because it uses http:// instead of https://.
All that code is going to be deleted so I ported it to the new version of margo.
With the margo.go file open (ctrl+.,ctrl+x), press ctrl+9 to open 9o and type go get -v contrib.margo.sh/golang/playground.
After that you can use it by adding import "contrib.margo.sh/golang/playground" to the margo.go file and &playground.Share{}, to your list of reducers.
This will add a new 9o command GoPlayground.Share and a ui command (ctrl+.,ctrl+c) with title Share file on play.golang.org.
@DisposaBoy - Sorry, I'm confused. Will this issue get fixed in an upcoming release of GoSublime?
@bminer No, the code will be deleted so the whole share feature will be removed, but the reducer I mention effectively does the same thing.