Fix for servers responding partial URLs
Some Send server responds with a URL without scheme. Therefore, Url::parse(&self.url)
fails. This PR adds a fallback for this case.
Fixes https://github.com/timvisee/ffsend/issues/159
Remarks: If you want to mimic a server like this, you can insert the following codes before this line.
let upload_response = UploadResponse {
url: upload_response
.url
.strip_prefix("https://")
.unwrap()
.to_string(),
id: upload_response.id,
owner_token: upload_response.owner_token,
};
I notice that you might prefer GitLab, so I make a copy from https://github.com/timvisee/ffsend-api/pull/81.