(self, obj, http=None)
Add another `RemoteObject` to this remote resource through an HTTP
        ``POST`` request.

        Parameter `obj` is a `RemoteObject` instance to save to this
        instance's resource. For example, this (`self`) may be a collection to
        which you want to post an asset (`obj`).

        Optional parameter `http` is the user agent object to use for posting.
        `http` should be compatible with `httplib2.Http` objects.
Add another `RemoteObject` to this remote resource through an HTTP
        ``POST`` request.
Add another RemoteObject to this remote resource through an HTTP POST request .
def post(self, obj, http=None):
        """Add another `RemoteObject` to this remote resource through an HTTP
        ``POST`` request.

        Parameter `obj` is a `RemoteObject` instance to save to this
        instance's resource. For example, this (`self`) may be a collection to
        which you want to post an asset (`obj`).

        Optional parameter `http` is the user agent object to use for posting.
        `http` should be compatible with `httplib2.Http` objects.

        """
        if getattr(self, '_location', None) is None:
            raise ValueError('Cannot add %r to %r with no URL to POST to'
                % (obj, self))

        body = json.dumps(obj.to_dict(), default=omit_nulls)

        headers = {'content-type': self.content_types[0]}

        request = obj.get_request(url=self._location, method='POST',
            body=body, headers=headers)
        if http is None:
            http = userAgent
        response, content = http.request(**request)

        obj.update_from_response(self._location, response, content)
def post ( self , obj , http = None ) : if getattr ( self , '_location' , None ) is None : raise ValueError ( 'Cannot add %r to %r with no URL to POST to' % ( obj , self ) ) body = json . dumps ( obj . to_dict ( ) , default = omit_nulls ) headers = { 'content-type' : self . content_types [ 0 ] } request = obj . get_request ( url = self . _location , method = 'POST' , body = body , headers = headers ) if http is None : http = userAgent response , content = http . request ( * * request ) obj . update_from_response ( self . _location , response , content )