Skip to content
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

Make solution URI-safe when sending to API #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vegeta897
Copy link

My correct solution for 2022 day 25 was failing when submitting through aocrunner. I know it was correct because submitting it manually on the website worked.

I suspect that the problem is that the solution isn't being URI encoded, and since the solution contained equals (=) characters, the answer was not properly received at the API end.

This PR simply wraps the solution in encodeURIComponent() in the body of the POST fetch.

I haven't confirmed that this is the reason it was rejecting my correct answer, but the solution should be URI encoded regardless.

@MartijnKooij
Copy link

Thanks! I had the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants