Save url generated by ngrok to file
@param url
494642
function saveUrl(url) {
  fs.writeFile('serve-url.log', url, error => {
    if (error) {
      return console.log(error)
    }

    console.log('serve-url.log updated!')
  })
}
602383
public void put(String url, String result) {
        if (TextUtils.isEmpty(url)) {
            return;
        }

        ContentValues contentValues = new ContentValues();
        contentValues.put(OfflinerDBHelper.REQUEST_RESULT, result);
        contentValues.put(OfflinerDBHelper.REQUEST_URL, url);
        contentValues.put(OfflinerDBHelper.REQUEST_TIMESTAMP, Calendar.getInstance().getTime().getTime());

        this.startQuery(
                TOKEN_CHECK_SAVED_STATUS,
                contentValues,
                getUri(OfflinerDBHelper.TABLE_CACHE),
                OfflinerDBHelper.PARAMS_CACHE,
                OfflinerDBHelper.REQUEST_URL + " = '" + url + "'",
                null,
                null
        );
    }
379065
function saveText() {
        var uriContent = "data:application/octet-stream," + encodeURIComponent(editor.getSession().getValue());
        document.location.href = uriContent;
    }
463779
protected static function saveExternalFile($url, $path)
    {
        if ($data = file_get_contents($url)) {
            return (self::saveFile($path, $data)) ? $data : '';
        }

        return '';
    }
1256041
function saveWebHook(projectRoot, hookContent) {
  var filePath = path.join(projectRoot, WEB_HOOK_FILE_PATH);
  var isSaved = true;

  // ensure directory exists
  createDirectoryIfNeeded(path.dirname(filePath));

  // write data to file
  try {
    fs.writeFileSync(filePath, hookContent, 'utf8');
  } catch (err) {
    console.warn('Failed to create android web hook!');
    console.warn(err);
    isSaved = false;
  }

  return isSaved;
}
730009
public static void addFileURL(File f) {
        String absolutePath = f.getAbsolutePath();
        if (!filterFile(absolutePath)) {
            try {
                recordURL(f.toURI().toURL().toExternalForm());
            } catch (MalformedURLException e) {
                // Never expected.
            }
        }
    }
1341264
public static void downloadImageToFile(String url, Path file) throws IOException {


        if (Files.exists(file.getParent())) {
            URL urlObject = new URL(url);
            URLConnection connection = urlObject.openConnection();
            connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
            connection.setRequestProperty("Referer", "http://www.google.com");


            FileUtils.copyInputStreamToFile(connection.getInputStream(), file.toFile());
        }
    }
1076355
private static String encodeUrl(String url) {
        try {
            URL u = new URL(url);
            return encodeUrl(u).toExternalForm();
        } catch (Exception e) {
            return url;
        }
	}
1293007
def write(url, content, **args):
    """"""
    with FileResource(url, **args) as resource:
        resource.write(content)
791793
public String getURL(String url, Object optParam, boolean keepSettings) throws IOException {
		StringBuilder SB=new StringBuilder();
		SB.append(url);
		List<String> finishedParams=new SortedArrayList<>();
		boolean alreadyAppended=appendParams(SB, optParam, finishedParams, false);
		if(keepSettings) appendSettings(finishedParams, alreadyAppended, SB);
		return SB.toString();
	}
1234298
def save(url, destination):
    
    r = requests.get(url, stream=True)

    with open(destination, 'wb') as fd:
        for chunk in r.iter_content(chunk_size=128):
            fd.write(chunk)
961538
def save(self, url, storage_options=None):
        
        from dask.bytes import open_files
        with open_files([url], **(storage_options or {}), mode='wt')[0] as f:
            f.write(self.serialize())
751848
public void urlCheckAndSave(BasicCheckInfo basicCheckInfo, ParamType paramType, ReqUrl reqUrl, Class<?> type) {
        if (!this.validationConfig.isFreshUrlSave() || !basicCheckInfo.isUrlMapping()) {
            return;
        }

        List<ValidationData> datas = this.validationDataRepository.findByParamTypeAndMethodAndUrl(paramType, reqUrl.getMethod(), reqUrl.getUrl());
        if (datas.isEmpty()) {
            this.saveParameter(basicCheckInfo.getDetailParam(), paramType, reqUrl, null, type, 0, this.validationConfig.getMaxDeepLevel());
            this.validationDataRepository.flush();
            this.validationStore.refresh();
        }
    }
167217
def write_url (self, url_data):
        """"""
        self.write(self.part('url') + self.spaces('url'))
        txt = strformat.strline(url_data.base_url)
        self.writeln(txt, color=self.colorurl)
1196122
private void writeURL(JsonGenerator jsonGenerator, Object entity) throws IOException {
        // It is exactly the same as the 'name' property.
        jsonGenerator.writeFieldName(URL);
        if (entity instanceof EntitySet) {
            jsonGenerator.writeObject(((EntitySet) entity).getName());
        } else {
            jsonGenerator.writeObject(((Singleton) entity).getName());
        }
    }
589635
public void save(final XmlWriter w) throws KNXMLException
	{
		w.writeStartElement(TAG_ADDRESS);
		w.writeAttribute(ATTR_TYPE, getType());
		w.writeCharacters(toString());
		w.writeEndElement();
	}
584331
function saveFile(html) {
	fs.outputFile(options.outputFile, html, function(err, data) {
		if (err) {
			console.log(error('ERROR!'));
			console.dir(err);
			process.exit(1);
		}
		console.log(good('\n\nAll done!'));
		console.log('Created file: ' + good(options.outputFile));
	});
}