New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posting to go playground results in wrong method error #900

Open
jvsteiner opened this Issue Dec 20, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@jvsteiner
Copy link

jvsteiner commented Dec 20, 2018

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
@jvsteiner

This comment has been minimized.

Copy link

jvsteiner commented Dec 20, 2018

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..

@DisposaBoy

This comment has been minimized.

Copy link
Owner

DisposaBoy commented Dec 20, 2018

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.

@bminer

This comment has been minimized.

Copy link

bminer commented Jan 9, 2019

@DisposaBoy - Sorry, I'm confused. Will this issue get fixed in an upcoming release of GoSublime?

@DisposaBoy

This comment has been minimized.

Copy link
Owner

DisposaBoy commented Jan 10, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment