From: Gabriel Goller <g.goller@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH] metrics: influxdb test uri creation
Date: Thu, 23 May 2024 13:07:29 +0200 [thread overview]
Message-ID: <20240523110729.2xhie3ozqiqnakic@luna.proxmox.com> (raw)
In-Reply-To: <1716459590.lhiy4v1sfo.astroid@yuna.none>
On 23.05.2024 12:22, Fabian Grünbichler wrote:
>doesn't apply anymore.
>
>two small things:
>- form_urlencoded is just a re-export in url, maybe we want to actually
> use it instead since we don't otherwise need url?
Sure, we can do this.
>- IMHO it would be more elegant to use the provided Serializer instead
> of encoding manually, something like this:
>
> let writeuri_query = url::form_urlencoded::Serializer::new(String::new())
> .append_pair("org", organization)
> .append_pair("bucket", bucket)
> .finish();
> let writeuri = http::uri::Builder::new()
> .scheme(uri_parts.scheme.clone().unwrap())
> .authority(uri_parts.authority.clone().unwrap())
> .path_and_query(format!("{base_path}/api/v2/write?{writeuri_query}",))
> .build()?;
>
>AFAICT, the output is the same, but this is a much nicer interface?
Right, yes, this is cleaner :)
Will submit a new patch shortly!
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
prev parent reply other threads:[~2024-05-23 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 10:10 Gabriel Goller
2024-05-23 10:22 ` Fabian Grünbichler
2024-05-23 11:07 ` Gabriel Goller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240523110729.2xhie3ozqiqnakic@luna.proxmox.com \
--to=g.goller@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox