Perform a MKCOL request to a path
774524
def mkcol(path, options = {}, &block)
      perform_request Net::HTTP::Mkcol, path, options, &block
    end
171430
def mkdir(path)
      path = @uri.merge(path).path
      res = @handler.request(:mkcol, path, nil, @headers)
      res.body
    end
1073781
def post(path, options = {}, headers = {}, raw = false)
      request(:post, path, options, headers, raw)
    end
1029242
def mkpath(*args)
      args[0] = {} unless args[0]
      args[0] = args[0].merge(mode: 0700) unless args[0][:mode]
      FileUtils.mkpath(self.to_s, *args)
    end
1229456
public Response mkCol(Session session, String path, String nodeType, List<String> mixinTypes, List<String> tokens)
   {

      Node node;
      try
      {
         nullResourceLocks.checkLock(session, path, tokens);

         node = session.getRootNode().addNode(TextUtil.relativizePath(path), nodeType);
         // We set the new path
         path = node.getPath();

         if (mixinTypes != null)
         {
            addMixins(node, mixinTypes);
         }
         session.save();

      }

      catch (ItemExistsException exc)
      {
         return Response.status(HTTPStatus.METHOD_NOT_ALLOWED).entity(exc.getMessage()).build();

      }
      catch (PathNotFoundException exc)
      {
         return Response.status(HTTPStatus.CONFLICT).entity(exc.getMessage()).build();

      }
      catch (AccessDeniedException exc)
      {
         return Response.status(HTTPStatus.FORBIDDEN).entity(exc.getMessage()).build();

      }
      catch (LockException exc)
      {
         return Response.status(HTTPStatus.LOCKED).entity(exc.getMessage()).build();

      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
         return Response.serverError().entity(exc.getMessage()).build();
      }

      if (uriBuilder != null)
      {
         return Response.created(uriBuilder.path(session.getWorkspace().getName()).path(path).build()).build();
      }

      // to save compatibility if uriBuilder is not provided
      return Response.status(HTTPStatus.CREATED).build();
   }
888873
def mkpath(*segments, **query):
    
    # Remove empty segments (e.g. no key specified)
    segments = [bytes_to_str(s) for s in segments if s is not None]
    # Join the segments into a path
    pathstring = '/'.join(segments)
    # Remove extra slashes
    pathstring = re.sub('/+', '/', pathstring)

    # Add the query string if it exists
    _query = {}
    for key in query:
        if query[key] in [False, True]:
            _query[key] = str(query[key]).lower()
        elif query[key] is not None:
            if PY2 and isinstance(query[key], unicode):  # noqa
                _query[key] = query[key].encode('utf-8')
            else:
                _query[key] = query[key]

    if len(_query) > 0:
        pathstring += "?" + urlencode(_query)

    if not pathstring.startswith('/'):
        pathstring = '/' + pathstring

    return pathstring
576714
def update(self, params, path, **kwargs):
        
        self.client.request('POST', params, path, **kwargs)
106780
def mkdir_command(endpoint_plus_path):
    
    endpoint_id, path = endpoint_plus_path

    client = get_client()
    autoactivate(client, endpoint_id, if_expires_in=60)

    res = client.operation_mkdir(endpoint_id, path=path)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
1026758
function mkSrc(p) {
    var src = {};
    if (typeof p.inject === 'string') { src.async = p.inject; }
    src.path = fspath.extname(p.route) ?
               p.route :
               ppath.join(p.route || '/', fspath.basename(p.path));
    return src;
  }
1002736
def get(path,data={},headers=nil)
      data_to_query(data)
      if headers == nil
        response = @http.send_request('GET', path, @defaults[:data])
      else
        response = @http.send_request('GET', path, @defaults[:data], headers)
      end
      response
    end
1263731
function mkpath(path) {
    var dirs = path.split(PATH.sep);
    var _path = '';
    var winDisk = /^\w{1}:\\$/;

    dirs.forEach(function(dir) {
        dir = dir || PATH.sep;
        if (dir) {
            _path = _path ? PATH.join(_path, dir) : dir;
            // fs.mkdirSync('/') raises EISDIR (invalid operation) exception on OSX 10.8.4/node 0.10
            // fs.mkdirSync('D:\\') raises EPERM (operation not permitted) exception on Windows 7/node 0.10
            // not tested in other configurations
            if (_path === '/' || winDisk.test(PATH.resolve(dir))) {
                return;
            }
            // @see https://github.com/veged/borschik/issues/90
            try {
                fs.mkdirSync(_path);
            } catch(e) {
                // ignore EEXIST error
                if (e.code !== 'EEXIST') {
                    throw new Error(e)
                }
            }
        }
    });
}
1040629
def insert_request_to_batch(self, request):
        '''
        
        '''
        self.validate_request_table(request)
        self.validate_request_partition_key(request)
        self.validate_request_row_key(request)
        self.batch_requests.append(request)
492103
def request(method, path, params={}, body=nil, headers={}, options={}, &block)
      options = { :mashify => true }.merge(options)
      req = http.build_request(method)
      req.path = path
      req.params.update(Util.clean_params(params)) if params
      req.body = body
      req.headers.update(headers) if headers
      block.call(req) if block
      logger.debug { Util.curl_format(req) }

      if @http_threadsafe
        env = req.to_env(http)
        check_response(http.app.call(env), options)
      else
        @request_mtx.synchronize {
          env = req.to_env(http)
          check_response(http.app.call(env), options)
        }
      end
    end
1199001
def get(path, options={}, raw=false, faraday_options={})
      request(:get, path, options, raw, faraday_options)
    end
1034375
def options(path, options = {}, &block)
      perform_request Net::HTTP::Options, path, options, &block
    end
24780
def get(path, options={}, format=format)
      respond request(:get, path, options, format)
    end
21980
def request(method, path)
        resource[path].send(method.to_sym, request_headers) { |response, request, result, &block|
          case response.code
            when 200
              response
            when 400
              if response.include? ' is required'
                raise ArgumentError.new(response)
              else
                raise BadRequestError.new(response)
              end
            else
              response.return!(request, result, &block)
          end
        }
      end