copy grpcurl readme and fix

This commit is contained in:
Gregory Schier
2025-07-19 09:10:49 -07:00
parent b32fe466b1
commit 60883cc1b9
6 changed files with 89 additions and 3 deletions

View File

@@ -90,15 +90,15 @@ export async function convert(request: Partial<GrpcRequest>, allProtoFiles: stri
if (request.url) {
const server = request.url.replace(/^https?:\/\//, ''); // remove protocol
xs.push(server);
xs.push(NEWLINE);
}
// Add service + method
if (request.service && request.method) {
xs.push(`${request.service}/${request.method}`);
xs.push(NEWLINE);
}
xs.push(NEWLINE);
// Remove trailing newline
if (xs[xs.length - 1] === NEWLINE) {
xs.splice(xs.length - 1, 1);