<commit_before>module.exports = upload

var https = require('https')

function upload(form, callback) {
  var request = {
    method: 'POST',
    host: 'api.commonform.org',
    path: '/forms' }
  https.request(request, function(response) {
    var status = response.statusCode
    if (status === 200 || status === 201) {
      callback(null, response.headers.location) }<commit_msg>Require 201 status code for success<commit_after>module.exports = upload

var https = require('https')

function upload(form, callback) {
  var request = {
    method: 'POST',
    host: 'api.commonform.org',
    path: '/forms' }
  https.request(request, function(response) {
    if (response.statusCode === 201) {
      callback(null, response.headers.location) }
{'fraction_non_alphanumeric': 0.14209115281501342, 'fraction_numerical': 0.0160857908847185, 'mean_word_length': 3.8506493506493507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1927867', 'n_tokens_mistral': 234, 'n_tokens_neox': 221, 'n_words': 56}