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

restclient post json #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

restclient post json #11

wants to merge 2 commits into from

Conversation

gagalago
Copy link
Contributor

a wrong content type was send. now it's realy json

@@ -12,7 +12,7 @@ namespace :eventually_tracker do
api_key = Base64.encode64 EventuallyTracker.config.api_key
api_secret = Base64.encode64 EventuallyTracker.config.api_secret
logger.debug "Publish event: #{event} to #{uri.to_s}."
RestClient.post uri.to_s, event: event, content_type: :json, accept: :json, api_key: api_key, api_secret: api_secret
RestClient.post uri.to_s, {event: event, api_key: api_key, api_secret: api_secret}.to_json, content_type: "application/json", accept: :json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L'api_key et api_secret vont se retrouver dans le body et non dans le header comme ça. Je suis d'accord de faire {event: event}.to_json mais je vois pas pourquoi il faut mettre l'api key et secret en json aussi...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bien vu je corrige ca de suite

@gagalago
Copy link
Contributor Author

gagalago commented Jun 1, 2015

attend que je je regarde si ca fonctionne toujour bien en prenant en compte ton commentaire.

@loicvigneron
Copy link
Contributor

okay, j'attends le feedback

@gagalago
Copy link
Contributor Author

gagalago commented Jul 7, 2015

un mois plus tard, je redecouvre le post-it qui me dis de te dire que c'est bon ;)

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.

2 participants