:nodoc:
 post data to twitter api

   url takes the path like
     '/statuses/update.format'

   the body contains all data you send to twitter
     {:status => "a new status"}
333056
def post(path, body)
      LOG.debug("post #{body} to \"#{path}\"")
      response = @access_token.post(path, body)
      parse_response(response)
    end
1289124
def upload(status, file, query={})
      PostBodyHack.apply_hack({:status => status}.merge(query)) do
        perform_post("/statuses/upload.json", build_multipart_bodies({:pic => file, :status => status}.merge(query)))
      end
    end
347530
def post(path, options={}, format=format)
      respond request(:post, path, options, format)
    end
385522
def update_status(self, *pargs, **kwargs):
        
        try:
            return super(API, self).update_status(*pargs, **kwargs)

        except tweepy.TweepError as e:
            if getattr(e, 'api_code', None) == 503:
                sleep(10)
                return super(API, self).update_status(*pargs, **kwargs)
            else:
                raise e
225005
def post_json(self, url, data, cls=None, **kwargs):
        
        kwargs['data'] = to_json(data, cls=cls)
        kwargs['headers'] = self.default_headers
        return self.post(url, **kwargs).json()
815180
def post(self, data):
        
        uri = '{}/sinkhole'.format(self.client.remote)
        self.logger.debug(uri)

        if PYVERSION == 2:
            try:
                data = data.decode('utf-8')
            except Exception:
                data = data.decode('latin-1')

        data = {
            'message': data
        }

        body = self.client.post(uri, data)
        return body
873238
def post_status(
    app,
    user,
    status,
    visibility='public',
    media_ids=None,
    sensitive=False,
    spoiler_text=None,
    in_reply_to_id=None
):
    

    # Idempotency key assures the same status is not posted multiple times
    # if the request is retried.
    headers = {"Idempotency-Key": uuid.uuid4().hex}

    return http.post(app, user, '/api/v1/statuses', {
        'status': status,
        'media_ids[]': media_ids,
        'visibility': visibility,
        'sensitive': str_bool(sensitive),
        'spoiler_text': spoiler_text,
        'in_reply_to_id': in_reply_to_id,
    }, headers=headers).json()
912162
def _post(self, url, data):
        
        return self.session.post(self.WRITE_URL_PRE + url % self.event_key, data=data, headers={'X-TBA-Auth-Sig': md5((self.auth_secret + '/api/trusted/v1/' + url % self.event_key + data).encode('utf-8')).hexdigest()})
89314
def post_json(self, uri, data, **kwargs):
        
        encoded_data = json.dumps(data)
        kwargs.setdefault("headers", {}).update({
            "Content-Type": "application/json",  # tell server we are sending json
        })
        return self.post(uri, data=encoded_data, **kwargs)
751493
def post(url, data={}, options={})
      response = connection.post do |req|
        req.saddle_options = options
        req.url(url)
        req.body = data
      end
      handle_response(response)
    end
1064678
def tweet(*args)
      load_default_token
      # get it from them directly
      tweet_text = args.join(' ').strip
      # or let them append / or pipe
      tweet_text += (tweet_text.empty? ? '' : ' ') + STDIN.read unless STDIN.tty?
      # or let them get prompted for it
      if tweet_text.empty?
        print 'Tweet (Press return to finish): '
        tweet_text = STDIN.gets.strip
      end
      return failtown("Empty Tweet") if tweet_text.empty?
      return failtown("Tweet is too long!") if tweet_text.scan(/./mu).size > 140
      return failtown("Unauthorized, re-run setup!") unless @client && @client.authorized?
      # actually post it
      @client.update(tweet_text)
      puts "Tweet Posted!"
    end
6163
def retweet?(status)
      filters = load_filters
      retweet = true
      if !filters.nil?
        filters.each_pair do |path, value|
          array = []
          array << value
          array.flatten.each do |filter_value|
            path_value = StreamBot::ArrayPath.get_path(status, path)
            if path_value.eql?(filter_value) || path_value.include?(filter_value)
              on_match.trigger(status, path, filter_value)
              retweet = false
            end
          end
        end
      end
      retweet
    end
200408
def post(self, path, data):
        
        uri = self.config.get_target() + path
        headers = self._post_headers()

        logging.debug("URI=POST " + str(uri))
        logging.debug("HEADERS=" + str(headers))
        logging.debug("BODY=" + str(data))

        response = self.session.post(uri, headers=headers,
                data=json.dumps(data))
        if response.status_code in (200, 201, 202):
            return response.json()
        elif response.status_code == 401:
            raise predix.admin.cf.config.CloudFoundryLoginError('token invalid')
        else:
            logging.debug("STATUS=" + str(response.status_code))
            logging.debug("CONTENT=" + str(response.content))
            response.raise_for_status()
912593
def post_resource(url, body):
    
    response = Bridge_DAO().postURL(url, PHEADER, body)
    log_data = "POST %s %s ==status==> %s" % (url, body, response.status)

    if response.status != 200 and response.status != 201:
        # 201 Created
        _raise_exception(log_data, url, response)

    _log_resp(log_data, response.data)
    return response.data
249689
def _post(self, q, payload='', params=''):
        ''''''
        if (q[-1] == '/'): q = q[:-1]
        headers = {'Content-Type': 'application/json'}
        r = requests.post('{url}{q}?api_key={key}{params}'.format(url=self.url, q=q, key=self.api_key, params=params),
                        headers=headers, data=payload)
        ret = DotDict(r.json())
        if (not r.ok or ('error' in ret and ret.error == True)):
            raise Exception(r.url, r.reason, r.status_code, r.json())
        return DotDict(r.json())
141770
def post(options)
      payload = {
        username: @options['name'],
        channel:  @options['channel']
      }.merge(options)
      payload[:channel] = payload[:channel].gsub(/^#?/, '#') #slack api needs leading # on channel
      request = Net::HTTP::Post.new(@uri.request_uri)
      request.set_form_data(payload: payload.to_json)
      @http.request(request)
      return nil # so as not to trigger text in outgoing webhook reply
    end
1148657
def post_resource(self, path, body=None, json=None):
        
        url = '%s%s' % (path, self._param_list())
        headers = {
            'Accept': 'application/json;odata=minimalmetadata'
        }

        if json:
            headers['Content-Type'] = 'application/json'
            body = json_dumps(json)

        response = O365_DAO().postURL(self._url(url), headers, body)

        if not (response.status == 200 or response.status == 201 or
                response.status == 204):
            raise DataFailureException(url, response.status, response.data)

        return json_loads(response.data)