this is the beautiful code whit net/http and uri
what do you think?

    url= hooks_url+"?access_token=#{user.github_token}"
    uri = URI.parse(url)
    http =  Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE


    req = Net::HTTP::Post.new(url)
    req['Content-Type'] = "application/json"

    req.body = hook_options
    response = http.start{|http| http.request(req)}

    response.body['id'].present? ? self.hook_id = response['id'] : false