POST the object to the JSS.
509524
def save(self):
        """"""
        try:
            response = requests.post(self._upload_url,
                                     auth=self.jss.session.auth,
                                     verify=self.jss.session.verify,
                                     files=self.resource)
        except JSSPostError as error:
            if error.status_code == 409:
                raise JSSPostError(error)
            else:
                raise JSSMethodNotAllowedError(self.__class__.__name__)

        if response.status_code == 201:
            if self.jss.verbose:
                print "POST: Success"
                print response.text.encode("utf-8")
        elif response.status_code >= 400:
            error_handler(JSSPostError, response)
664670
def post(self, request):
        ''''''
        serializer = CreateTokenSerializer(data=request.data)
        serializer.is_valid(raise_exception=True)

        email = serializer.validated_data.get('email')
        password = serializer.validated_data.get('password')
        user = authenticate(username=email, password=password)
        if not user:
            return Response(status=status.HTTP_401_UNAUTHORIZED)

        Token.objects.filter(user=user).delete()
        token = Token.objects.create(user=user)

        return Response(
            status=status.HTTP_201_CREATED, data={'token': token.key})
30900
function postForm({ url, payload, useBearer }) {
  return ajax({
    url,
    body: makeFormData( payload ),
    method: 'post',
    useBearer
  })
}
729770
def post(self, receiver_id=None):
        """"""
        try:
            user_id = request.oauth.access_token.user_id
        except AttributeError:
            user_id = current_user.get_id()

        event = Event.create(
            receiver_id=receiver_id,
            user_id=user_id
        )
        db.session.add(event)
        db.session.commit()

        # db.session.begin(subtransactions=True)
        event.process()
        db.session.commit()
        return make_response(event)
293332
def post(self, request, *args, **kwargs):
        """"""
        try:
            kwargs = self.load_object(kwargs)
        except Exception as e:
            return self.render_te_response({
                'title': str(e),
            })

        if not self.has_permission(request):
            return self.render_te_response({
                'title': 'No access',
            })
        return self.render_te_response(self.handle_dialog(*args, **kwargs))
334171
def push(self, obj):
        
        if isinstance(obj, str):
            obj = KQMLToken(obj)
        self.data.insert(0, obj)
853357
function post()
	{
		$originalProp = $this->props;
		
		# If the ID property is specified for the destination then it must be a list import
		if (array_key_exists('DestinationObject', $this->props)) {
			if (array_key_exists('ID', $this->props['DestinationObject'])){
				$this->props['DestinationObject'] = new SoapVar($this->props['DestinationObject'], SOAP_ENC_OBJECT, 'List', "http://exacttarget.com/wsdl/partnerAPI");
			}
		}
		
		$obj = parent::post();
		$this->props = $originalProp;
		return $obj;
	}
678673
def post(self, request, *args, **kwargs):
        

        # Prepare base
        if 'pk' in kwargs:
            self.object = self.get_object()
        else:
            self.object = None
        form_class = self.get_form_class()

        # Get prefix
        if 'field_prefix' in form_class.Meta.__dict__:
            # Get name from the form
            field_prefix = form_class.Meta.field_prefix
            # Initialize list of fields
        else:
            # Get name from the class
            field_prefix = str(form_class).split("'")[1].split(".")[-1]
        self.field_prefix = field_prefix

        # Build the form
        form = self.get_form(form_class)

        # Find groups
        if 'groups' in dir(self):
            # Save groups
            groups = self.groups
            # Redefine groups inside the form
            form.__groups__ = lambda: groups
            # Initialize list of fields
            fields = []
        else:
            groups = None

        # Add special prefix support to properly support form independency
        form.add_prefix = lambda fields_name, field_prefix=field_prefix: "%s_%s" % (field_prefix, fields_name)

        # Check validation
        valid = form.is_valid()
        if (not valid) and ('non_field_errors' in dir(self)):
            errors = [element[5] for element in list(self.non_field_errors())[:-1]]
        elif form.errors.as_data():
            errors = []
            for element in form.errors.as_data():
                for err in form.errors.as_data()[element][0]:
                    errors.append(err)
        else:
            errors = []

        # For every extra form
        temp_forms = []
        position_form_default = 0
        for (formelement, linkerfield, modelfilter) in self.forms:
            if formelement is None:
                formobj = form
                position_form_default = len(temp_forms)
            else:
                # Locate linked element
                if self.object:
                    related_name = formelement._meta.model._meta.get_field(linkerfield).related_query_name()
                    queryset = getattr(self.object, related_name)
                    if modelfilter:
                        queryset = queryset.filter(eval("Q(%s)" % (modelfilter)))
                    get_method = getattr(queryset, 'get', None)
                    if get_method:
                        instance = queryset.get()
                    else:
                        instance = queryset
                else:
                    instance = None

                # Get prefix
                if 'field_prefix' in formelement.Meta.__dict__:
                    # Get name from the form
                    field_prefix = formelement.Meta.field_prefix
                else:
                    # Get name from the class
                    field_prefix = str(formelement).split("'")[1].split(".")[-1]
                self.field_prefix = field_prefix

                # Prepare form
                formobj = formelement(instance=instance, data=self.request.POST)
                formobj.form_name = form.form_name

                # Excluded fields
                if 'exclude' not in formobj.Meta.__dict__:
                    formobj.Meta.exclude = [linkerfield]
                elif linkerfield not in formobj.Meta.exclude:
                    formobj.Meta.exclude.append(linkerfield)
                if linkerfield in formobj.fields:
                    del(formobj.fields[linkerfield])

                # Link it to the main model
                formobj.add_prefix = lambda fields_name, field_prefix=field_prefix: "%s_%s" % (field_prefix, fields_name)

                # Validate
                valid *= formobj.is_valid()

                # append error
                if not formobj.is_valid() and ('non_field_errors' in dir(formobj)):
                    errors += [element[5] for element in list(formobj.non_field_errors())[:-1]]

            # Save fields to the list
            if groups:
                for field in formobj:
                    # raise Exception (field.__dict__)
                    if 'unblock_t2ime' in field.html_name:
                        raise Exception(field.field.__dict__)
                    fields.append(field)

            # Add a new form
            temp_forms.append((formobj, linkerfield))

        # execute validation specified
        validate_forms = None
        if valid and ("validate" in dir(self)):
            validate_forms = [tform[0] for tform in temp_forms]
            errors = self.validate(*validate_forms)
            # valid = len(errors) == 0
            valid = False
            if errors is None or len(errors) == 0:
                valid = True

        # Remember list of fields
        if groups:
            form.list_fields = fields
            forms = []
        else:
            if validate_forms:
                forms = validate_forms
            else:
                forms = [tform[0] for tform in temp_forms]

        if position_form_default == 0:
            open_tabs = 1
        else:
            open_tabs = 0

        # Check validation result
        if valid:
            # Everything is OK, call valid
            return self.form_valid(form, temp_forms)
        else:
            # Something went wrong, attach error and call invalid
            form.list_errors = errors
            return self.form_invalid(form, forms, open_tabs, position_form_default)
767119
def _post(self, url, data=None, json=None, params=None, headers=None):
        """"""
        url = self.clean_url(url)
        response = requests.post(url, data=data, json=json, params=params,
                                 headers=headers, timeout=self.timeout,
                                 verify=self.verify)
        return response
412184
def post(self, endpoint, params=None, version='1.1', json_encoded=False):
        """"""
        return self.request(endpoint, 'POST', params=params, version=version, json_encoded=json_encoded)
176500
def post(self, request, *args, **kwargs):
        

        self.object = self.get_object()
        form_class = self.get_form_class()
        form = self.get_form(form_class)
        formsets = self.get_formsets(form, saving=True)

        valid_formsets = True
        for formset in formsets.values():
            if not formset.is_valid():
                valid_formsets = False
                break

        if self.is_valid(form, formsets):
            return self.form_valid(form, formsets)
        else:
            adminForm = self.get_admin_form(form)
            adminFormSets = self.get_admin_formsets(formsets)
            context = {
                'adminForm': adminForm,
                'formsets': adminFormSets,
                'obj': self.object,
            }
            return self.form_invalid(form=form, **context)
1158124
def post(self, url, data):
        '''  '''
        data.update({'key': self.APIKEY})
        req = r.post(url,
                     data    = json.dumps(data),
                     headers = self.headers,
                     auth    = self.auth)
        return self.process_request(req)
1118945
def post(payload = {})
      options={method: :post, 
        payload: payload, 
        headers:{content_type: :json, accept: :json}
      }
      run(options)
    end
1308665
def post(url, data=None, json=None, **kwargs):
    """"""
    _set_content_type(kwargs)
    if _content_type_is_json(kwargs) and data is not None:
        data = dumps(data)
    _log_request('POST', url, kwargs, data)
    response = requests.post(url, data, json, **kwargs)
    _log_response(response)
    return response
533063
def post(self, url, data=None, json=None, callback=None, retry=0, **kwargs):
        """"""
        return self.request(
            "post",
            url=url,
            data=data,
            json=json,
            callback=callback,
            retry=retry,
            **kwargs
        )
1277443
async def _post(self, program_id: int = None, json: dict = None) -> dict:
        """"""
        return await self._request(
            'post', 'program/{0}'.format(program_id), json=json)
743523
function send(object) {
  if (typeof object === 'object') {
    return write(this.filepath, JSON.stringify(object, null, '  '));
  } else {
    return write(this.filepath, object.toString());
  }
}