post -- POST HTTP value
           action -- SOAP Action value
543778
def getCallBack(self, ps, post, action):
        '''
        '''
        node = self.getNode(post)
        if node is None:
            raise NoSuchFunction
        if node.authorize(None, post, action):
            return node.getOperation(ps, action)
        else:
            raise NotAuthorized, "Authorization failed for method %s" % action
1059223
public void doPost(HttpServletRequest request,
                       HttpServletResponse response) 
        throws ServletException, IOException
    {
        HttpSession session = request.getSession(false);
        String action = request.getParameter("Action");
        String name =  request.getParameter("Name");
        String value =  request.getParameter("Value");
        String age =  request.getParameter("MaxAge");

        String nextUrl = getURI(request)+"?R="+redirectCount++;
        if (action.equals("New Session"))
        {   
            session = request.getSession(true);
        }
        else 
        if (session!=null)
        {
            if (action.equals("Invalidate"))
                session.invalidate();
            else if (action.equals("Set"))
            {   
                session.setAttribute(name,value);
                try
                {
                    int m = Integer.parseInt(age);
                    session.setMaxInactiveInterval(m);
                }
                catch(Exception e)
                {
                    LogSupport.ignore(log,e);
                }
            }
            else if (action.equals("Remove"))
                session.removeAttribute(name);
        }

        String encodedUrl=response.encodeRedirectURL(nextUrl);
        response.sendRedirect(encodedUrl);
        
    }
868796
function renderResponse(res, postUrl) {
    options.fault = options.fault || {};

    var fault = templates['soapFault']({
      code:         options.fault.code,
      description:  options.fault.description
    });

    var form = options.formTemplate ?
      interpolate(options.formTemplate) : templates[(!options.plain_form ? 'form' : 'form_el')];

    res.set('Content-Type', 'text/html');
    res.send(form({
      callback: postUrl,
      wctx:     options.wctx,
      wresult:  fault
    }));
  }
1118354
function customHTTPAction( $http, $action )
    {
        $eventType = $this->eventType();
        $eventType->customWorkflowEventHTTPAction( $http, $action, $this );
    }
334995
function post(url, data, successCallback, errorCallback) {
    const request = new XMLHttpRequest();

    request.open('POST', url, true);
    request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');

    request.onreadystatechange = () => {
        if (request.readyState === 4) {
            /* Only 2xx codes are successful for the POST request. */
            if ((request.status >= 200) && (request.status < 300)) {
                successCallback(request.responseText);
            } else {
                console.error(`POST (${url}): error ${request.status} ${request.statusText}`);
                errorCallback(request.status, request.statusText);
            }
        }
    };

    request.send(data);
}
614654
public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		String accountId  = getServletContext().getInitParameter("accountId"); // Put your AccountId here
		String email      = getServletContext().getInitParameter("email"); // Put your Email address here (Used for authentication and replies)
		String password   = getServletContext().getInitParameter("password");  // Put your Password here				
		
		String alertId = request.getParameter("alertId");
		String tel = request.getParameter("tel");
		String alertText = request.getParameter("alertText");        
        if(alertText == null || alertText.length() < 1) {
	        // Get the content of the request as the text to parse
	        byte[] content = new byte[request.getContentLength()];
	        request.getInputStream().read(content,0, request.getContentLength());        
	        alertText = new String(content); 	        
        }
        alertId = URLEncoder.encode(alertId, "UTF-8");
//        tel = URLEncoder.encode(tel, "UTF-8");
//        alertText = URLEncoder.encode(alertText, "UTF-8");        
		
		Integer nResult;
		StringBuffer strResponse = new StringBuffer();
		String sData;

		try {
			sData = ("AccountId=" + URLEncoder.encode(accountId, "UTF-8"));
//			sData += ("&Email=" + URLEncoder.encode(email, "UTF-8"));
			sData += ("&Email=" + email);
			sData += ("&Password=" + URLEncoder.encode(password, "UTF-8"));
			sData += ("&Recipient=" + URLEncoder.encode(tel, "UTF-8"));
			sData += ("&Message=" + URLEncoder.encode(alertText, "UTF-8"));

			if(logger.isInfoEnabled()) {        	
	        	logger.info("Got an alert : \n alertID : " + alertId + " \n tel : " + tel + " \n text : " +alertText);
	        	logger.info("Red Oxygen : \n Account Id : " + accountId + " \n email : " + email + " \n password : " + password);
	        	logger.info("Red Oxygen URL : \n URL : " + RED_OXYGEN_URL + " \n data : " + sData);
	        }
	        
			
			URL urlObject = new URL(RED_OXYGEN_URL);

			HttpURLConnection con = (HttpURLConnection) urlObject.openConnection();
			con.setRequestMethod(HTTP_METHOD);
			con.setDoInput(true);
			con.setDoOutput(true);

			DataOutputStream out = new DataOutputStream(con.getOutputStream());
			out.writeBytes(sData);
			out.flush();
			out.close();

			BufferedReader in = new BufferedReader(new InputStreamReader(con
					.getInputStream()));

			String inputLine;
			StringBuffer responseBuffer = new StringBuffer();

			while ((inputLine = in.readLine()) != null) {
				responseBuffer = responseBuffer.append(inputLine);
				responseBuffer = responseBuffer.append("\n\n\n");
			}

			strResponse.replace(0, 0, responseBuffer.toString());

			String sResultCode = strResponse.substring(0, 4);
			nResult = new Integer(sResultCode);

			in.close();
		} catch (Exception e) {			
			logger.error("Exception caught sending SMS",e);
			nResult = -2;
		}		

		sendHttpResponse(response, RESPONSE_BEGIN + "result : " + nResult + "<br/>response : " + strResponse + RESPONSE_END);
	}
798807
def _checkAction(self, action, value):
        '''
        '''
        if action is None:
            raise WSActionException, 'Response missing WSAddress Action'
        if not value:
            raise WSActionException, 'missing WSAddress Action, expecting %s' %action
        if value != action:
            raise WSActionException, 'wrong WSAddress Action(%s), expecting %s'%(value,action)
537780
@Override
	public <T extends Resource> T post(final String uri, final Map<String, String> params) throws UnsupportedEncodingException {
		return post(uri, new Parameters(unsafeCast(params)));
	}
174756
public void doHttpPost(String url, HttpResponse result, Map<String, Object> headers, String contentType) {
        httpClient.post(url, result, headers, contentType);
    }
478124
public function post($account, $action = '', $parameters = null, $file = null, $httpHeadersToSet = array())
    {
        return $this->sendRequest('POST', $account, $action, $parameters, $file, null, $httpHeadersToSet);
    }
206522
function post(data, url) {
            var xmlhttp;
            try {
                // Opera 8.0+, Firefox, Safari
                xmlhttp = new XMLHttpRequest();
            } catch (e) {
                // Internet Explorer Browsers
                try {
                    xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
                } catch (e) {
                    try {
                        xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
                    } catch (e) {
                        // Something went wrong
                        return false;
                    }
                }
            }

            xmlhttp.open('POST', url, true);
            var cookieName = cookie;
            xmlhttp.onreadystatechange = function () {
                if (xmlhttp.readyState === 4) {
                    if (xmlhttp.status === 200) {
                        document.cookie = cookieName + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC';
                    }
                }
            };
            xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
            xmlhttp.send(data);
        }
1324548
function soap_transport_http($url, $curl_options = NULL, $use_curl = false){
		parent::nusoap_base();
		$this->debug("ctor url=$url use_curl=$use_curl curl_options:");
		$this->appendDebug($this->varDump($curl_options));
		$this->setURL($url);
		if (is_array($curl_options)) {
			$this->ch_options = $curl_options;
		}
		$this->use_curl = $use_curl;
		preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);
		$this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')');
	}
1273989
public OvhTask serviceName_request_POST(String serviceName, OvhRequestActionEnum action) throws IOException {
		String qPath = "/hosting/web/{serviceName}/request";
		StringBuilder sb = path(qPath, serviceName);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "action", action);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhTask.class);
	}
308098
def _post(self, url, data={}):
        """"""
        r = requests.post(self._api_prefix + url,
            data=json.dumps(data),
            headers=self.headers,
            auth=self.auth,
            allow_redirects=False,
        )
        return self._action(r)
864954
public Post param(String name, String value){
        params.put(name, value);
        return this;
    }
65950
def soap_action(self, service, action, payloadbody):
        """"""
        payload = self.soapenvelope.format(body=payloadbody).encode('utf-8')
        headers = {"Host": self.url,
                   "Content-Type": "text/xml; charset=UTF-8",
                   "Cache-Control": "no-cache",
                   "Content-Length": str(len(payload)),
                   "SOAPAction": action}
        try:
            self.last_exception = None
            response = requests.post(url=self.url + service, headers=headers,
                                     data=payload, cookies=self.cookies)
        except requests.exceptions.RequestException as exp:
            self.last_exception = exp
            return False
        if response.status_code != 200:
            self.last_response = response
            return False
        self.cookies = response.cookies
        try:
            xdoc = xml.etree.ElementTree.fromstring(response.text)
        except xml.etree.ElementTree.ParseError as exp:
            self.last_exception = exp
            self.last_response = response
            return False
        return xdoc
1009572
def call(self, action_name, arg_in=None, http_auth=None, http_headers=None):
        
        if arg_in is None:
            arg_in = {}

        soap_env = '{%s}' % NS_SOAP_ENV
        m = '{%s}' % self.service_type

        root = etree.Element(soap_env+'Envelope', nsmap={'SOAP-ENV': NS_SOAP_ENV})
        root.attrib[soap_env+'encodingStyle'] = ENCODING_STYLE
        body = etree.SubElement(root, soap_env+'Body')
        action = etree.SubElement(body, m+action_name, nsmap={'m': self.service_type})
        for key, value in arg_in.items():
            etree.SubElement(action, key).text = str(value)
        body = etree.tostring(root, encoding=ENCODING, xml_declaration=True)
        headers = {
            'SOAPAction': '"%s#%s"' % (self.service_type, action_name),
            'Host': self._host,
            'Content-Type': 'text/xml',
            'Content-Length': str(len(body)),
        }
        headers.update(http_headers or {})

        try:
            resp = requests.post(
                self.url,
                body,
                headers=headers,
                timeout=SOAP_TIMEOUT,
                auth=http_auth
            )
            resp.raise_for_status()
        except requests.exceptions.HTTPError as exc:
            # If the body of the error response contains XML then it should be a UPnP error,
            # otherwise reraise the HTTPError.
            try:
                err_xml = etree.fromstring(exc.response.content)
            except etree.XMLSyntaxError:
                raise exc
            raise SOAPError(*self._extract_upnperror(err_xml))

        xml_str = resp.content.strip()
        try:
            xml = etree.fromstring(xml_str)
        except etree.XMLSyntaxError:
            # Try removing any extra XML declarations in case there are more than one.
            # This sometimes happens when a device sends its own XML config files.
            xml = etree.fromstring(self._remove_extraneous_xml_declarations(xml_str))
        except ValueError:
            # This can occur when requests returns a `str` (unicode) but there's also an XML
            # declaration, which lxml doesn't like.
            xml = etree.fromstring(xml_str.encode('utf8'))

        response = xml.find(".//{%s}%sResponse" % (self.service_type, action_name))
        if response is None:
            msg = ('Returned XML did not include an element which matches namespace %r and tag name'
                   ' \'%sResponse\'.' % (self.service_type, action_name))
            self._log.debug(msg + '\n' + etree.tostring(xml, pretty_print=True).decode('utf8'))
            raise SOAPProtocolError(msg)

        # Sometimes devices return XML strings as their argument values without escaping them with
        # CDATA. This checks to see if the argument has been parsed as XML and un-parses it if so.
        ret = {}
        for arg in response.getchildren():
            children = arg.getchildren()
            if children:
                ret[arg.tag] = b"\n".join(etree.tostring(x) for x in children)
            else:
                ret[arg.tag] = arg.text

        return ret