With POST body containing string
964629
public static Condition withPostBodyContaining(final String str) {
        return new Condition(input -> input.getPostBody() != null && input.getPostBody().contains(str));
    }
136416
async function post(url, body) {
  try {
    const response = await fetch(url, {
      method: 'POST',
      body: JSON.stringify(body),
    });

    wappalyzer.log(`POST ${url}: ${response.status}`, 'driver');
  } catch (error) {
    wappalyzer.log(`POST ${url}: ${error}`, 'driver', 'error');
  }
}
687725
@Deprecated
    public static String encodePostBody(Bundle parameters, String boundary) {
        if (parameters == null) return "";
        StringBuilder sb = new StringBuilder();

        for (String key : parameters.keySet()) {
            Object parameter = parameters.get(key);
            if (!(parameter instanceof String)) {
                continue;
            }

            sb.append("Content-Disposition: form-data; name=\"" + key +
                    "\"\r\n\r\n" + (String)parameter);
            sb.append("\r\n" + "--" + boundary + "\r\n");
        }

        return sb.toString();
    }
955972
private String getPostData(final ICommandLine cl) throws Exception {
        // String encoded = "";
        StringBuilder encoded = new StringBuilder();
        String data = cl.getOptionValue("post");
        if (data == null) {
            return null;
        }
        String[] values = data.split("&");
        for (String value : values) {
            String[] splitted = value.split("=");
            String key = splitted[0];
            String val = "";
            if (splitted.length > 1) {
                val = splitted[1];
            }
            if (encoded.length() != 0) {
                encoded.append('&');
            }
            encoded.append(key).append('=').append(URLEncoder.encode(val, "UTF-8"));
            // encoded += key + "=" + URLEncoder.encode(val, "UTF-8") + "&";
        }
        // if (encoded.endsWith("&")) {
        // StringUtils.removeEnd(encoded, "&");
        // }
        return encoded.toString();
    }
324827
function _validatePostData(data) {
  let message;
  let params = [
    ['secret_id', 'String', true, '您在第一步获取的secret_id'],
    ['is_new', 'String', true, "是否新建博客，可选0、1两个值：''0'，编辑博客；‘1’，新建博客"],
    ['id', 'String', true, '博客的ID，即博客唯一ID，支持数字、大小写字母、下划线、中划线，保存后不可更改'],
    ['title', 'String', true, '博客标题，可以是任意字符'],
    ['image', 'String', false, '博客主题图片，如果有则显示，目前仅在博客列表页（首页）中显示'],
    ['from', 'String', false, '博客来源，博客文章在您的博客网站中的链接'],
    ['content', 'String', true, '博客Markwown源码'],
    ['htmlContent', 'String', true, '博客markdown编译之后的html内容，用以展示在文档内容页'],
    ['introContent', 'String', true, '博客html格式的介绍内容，用以展示再文档列表页'],
    ['category', 'String', true, '博客分类的id，文档分类必须从博客分类列表接口中获取']
  ];

  for (let i = 0; i < params.length; i++) {
    let item = params[i];
    let key = item[0];

    if (item[2] && !data[key]) {
      message = '缺少参数：' + key + '，该参数为' + item[3];
      break;
    }
  }

  return message;
}
366780
function parseBody(req) {
    return extractBody(req)
        .then(() => {
            if (req.body && typeof req.body === 'object') return req.body;
            try {
                return JSON.parse(req.body);
            } catch (err) {
                throw Error('Unexpected body format received. Expected application/json, received: ' + req.body);
            }
        });
}
1092185
function parsebody(body){
	var result;
	try {
		result = typeof body === "string" ? JSON.parse(body): body;
	} catch(err) {
		result = body;
	}
	return result;
}
958642
def post(self, uri, body=None, **kwargs):
        """"""
        return self.fetch('post', uri, kwargs.pop("query", {}), body, **kwargs)
1212089
def body=(value)
      value = [] if !value || value == ''
      super(value.respond_to?(:each) ? value : [value.to_s])
    end
1288614
def body_echo(cls, request,
                  foo: (Ptypes.body, String('A body parameter'))) -> [
            (200, 'Ok', String)]:
        ''''''
        log.info('Echoing body param, value is: {}'.format(foo))
        for i in range(randint(0, MAX_LOOP_DURATION)):
            yield
        msg = 'The value sent was: {}'.format(foo)
        Respond(200, msg)
859026
function getPost(post) {
  if (!post || !post.body) return {};


  let postQuery = getPostQuery(post.body);
  let postIntro = postQuery.intro || getPostIntro(post.body);

  Object.assign(post, {
    intro: postIntro,
    query: postQuery,
    create_time: formatTime(post.created_at),
    update_time: formatTime(post.updated_at)
  })

  return post;
}
169281
private String getResponseBody(HttpResponse postResponse) {
        InputStream input = null;
        try {
            input = postResponse.getEntity().getContent();
            Reader reader = new InputStreamReader(input,
                    MwsUtl.DEFAULT_ENCODING);
            StringBuilder b = new StringBuilder();
            char[] c = new char[1024];
            int len;
            while (0 < (len = reader.read(c))) {
                b.append(c, 0, len);
            }
            return b.toString();
        } catch (Exception e) {
            throw MwsUtl.wrap(e);
        } finally {
            MwsUtl.close(input);
        }
    }
49957
function getSectionBody(sectionString) {
    /*first, use regular expressions to parse the section body into different
  objects */
    var sectionBody = {};
    var sectionBodyData = [];
    var objectFromBodyRegExp = /-*(\n){2,}(?!-{4,})[\S\s,]+?((?=((\n){3,}?))|\n\n$)/gi;
    //or go to the end of the string.
    var objectStrings = sectionString.match(objectFromBodyRegExp);
    //process each section object (from string to an actual object)
    for (var obj = 0; obj < objectStrings.length; obj++) {
        var sectionChild = processSectionChild(objectStrings[obj]);

        if (!isEmpty(sectionChild)) {
            if ('source' in sectionChild) {
                sectionBody.source = sectionChild.source;
            } else {
                sectionBodyData.push(sectionChild);
            }

        }
    }
    sectionBody.data = sectionBodyData;
    return sectionBody;

}
1107673
function formatPostData(data) { //, contentType
    // If it's a string, we assume it's properly encoded
    if (typeof(data) === 'string') return data;

    var queryString = [];

    for (var key in data) {
      queryString.push(
        encodeURIComponent(key) + '=' + encodeURIComponent(data[key])
      );
    }

    return queryString.join('&').replace(/\+/g, '%20');
  }
1006820
def request_body(query)
      params = {}

      query.each do |key, value|
        next if value.nil?
        value = value.map(&:to_s).join(' ') if value.is_a? Array
        params[key] = value
      end

      URI.encode_www_form params
    end
1263135
public void writeBodyFromString(String bodyAsString, Charset charset) {
        message.contentEncoding(charset.name())
                .contentType(Message.TEXT_PLAIN);
        byte[] bodyContent = bodyAsString.getBytes(charset);
        message.body(bodyContent);
    }
440675
def post(self, url, post_params=None):
        
        post_params['token'] = self.token
        params = urlencode(post_params)
        logger.debug('Making POST request to %s with body %s', url, params)
        return requests.post(url, data=params)