-
Notifications
You must be signed in to change notification settings - Fork 257
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
Form body should be URL encoded #86
base: master
Are you sure you want to change the base?
Conversation
In my testing this breaks the form submission. You just need to do |
Since we've got ActiveSupport can we just call |
I don't think so because we don't want to json encode the entire body just the |
@chadwilken I've never used Hubspot forms so I don't have any insight here, but do we really want to convert the context to JSON or is it just supposed to be url encoded? |
It has to be JSON in the url according to the docs and in my testing.
--
Edit: I removed your address and phone number
|
OK cool. I just wanted to make sure that converting it to JSON wasn't the wrong solution but proving the the correct results as a side-effect of conversion and URL encoding. |
Looping back on this. I was already encoding context with "Please Note All parameters must be URL encoded before being passed through the API, including |
HubSpot form API states the following:
"Please Note All parameters must be URL encoded before being passed through the API, including the hs_context parameter."
If it's not encoded and request contains URL unsafe characters, it silently fails to submit by creating empty fields.