Closed spheromak closed 10 years ago
this is a fix for #1
@marpaia any thoughts on this ?
@spheromak woops, sorry, I didn't see this. It looks great, thank you for adding it!
Can you add a unit test or something that shows how it's used in api_test.go or, preferably, implement an API method that makes a post request which uses it and makes a unit test for that?
Thanks again, this is great.
@marpaia yea no problem I was wanting to write tests for it. Wanted to make sure the approach was ok https://gist.github.com/spheromak/8678653#file-chef-go-L48-L59 is a simple refrence i used to try to exercise that api endpoint. I will look into how to test this more this weekend.
cool, thanks again @spheromak!
@marpaia Kicked this out while waiting for my flight back home. Let me know If you want something more complete. There wasn't an existing test for Post As far as i could see.
@spheromak yessssss, this is epic! thank you!!!!!
Post opperations to the chef-server that require data need an io object The current chef.Post implements the behavior of PostForm from standard library so I renamed it to chef.PostForm, and added chef.Post. chef.Post takes an io object and sends it to the server with the signed headers.
If you want this reversed and instead have a PostData method or something. Let me know. I am happy with that, but thought this seemed more idiomatic Go