diff --git a/public/screenshots/send-request/grpc/1-enable.grpc-support.webp b/public/screenshots/send-request/grpc/1-enable.grpc-support.webp new file mode 100644 index 00000000..b30f1c2c Binary files /dev/null and b/public/screenshots/send-request/grpc/1-enable.grpc-support.webp differ diff --git a/public/screenshots/send-request/grpc/1-grpc-interface.webp b/public/screenshots/send-request/grpc/1-grpc-interface.webp new file mode 100644 index 00000000..1a8cd868 Binary files /dev/null and b/public/screenshots/send-request/grpc/1-grpc-interface.webp differ diff --git a/public/screenshots/send-request/grpc/2-create-grpc-req.webp b/public/screenshots/send-request/grpc/2-create-grpc-req.webp new file mode 100644 index 00000000..e4c6e803 Binary files /dev/null and b/public/screenshots/send-request/grpc/2-create-grpc-req.webp differ diff --git a/public/screenshots/send-request/grpc/3-select-method.webp b/public/screenshots/send-request/grpc/3-select-method.webp new file mode 100644 index 00000000..1af8d4d5 Binary files /dev/null and b/public/screenshots/send-request/grpc/3-select-method.webp differ diff --git a/public/screenshots/send-request/grpc/4-add-msg-receive-resp.webp b/public/screenshots/send-request/grpc/4-add-msg-receive-resp.webp new file mode 100644 index 00000000..18acf75d Binary files /dev/null and b/public/screenshots/send-request/grpc/4-add-msg-receive-resp.webp differ diff --git a/public/screenshots/send-request/grpc/coll-level-proto-file.webp b/public/screenshots/send-request/grpc/coll-level-proto-file.webp new file mode 100644 index 00000000..9bba8f9b Binary files /dev/null and b/public/screenshots/send-request/grpc/coll-level-proto-file.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/1-grpc-interface.webp b/public/screenshots/send-request/grpc/grpc-streams/1-grpc-interface.webp new file mode 100644 index 00000000..1a8cd868 Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/1-grpc-interface.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/1-grpc-select-stream.webp b/public/screenshots/send-request/grpc/grpc-streams/1-grpc-select-stream.webp new file mode 100644 index 00000000..2471a18c Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/1-grpc-select-stream.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/2-autofill-grpc-msg.webp b/public/screenshots/send-request/grpc/grpc-streams/2-autofill-grpc-msg.webp new file mode 100644 index 00000000..29a4b9e5 Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/2-autofill-grpc-msg.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/3-building-stream-conn.webp b/public/screenshots/send-request/grpc/grpc-streams/3-building-stream-conn.webp new file mode 100644 index 00000000..bd7cb111 Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/3-building-stream-conn.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/4-add-multiple-msg.webp b/public/screenshots/send-request/grpc/grpc-streams/4-add-multiple-msg.webp new file mode 100644 index 00000000..cd9302e2 Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/4-add-multiple-msg.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/5-grpc-res.webp b/public/screenshots/send-request/grpc/grpc-streams/5-grpc-res.webp new file mode 100644 index 00000000..ec96c365 Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/5-grpc-res.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/coll-level-proto-file.webp b/public/screenshots/send-request/grpc/grpc-streams/coll-level-proto-file.webp new file mode 100644 index 00000000..9bba8f9b Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/coll-level-proto-file.webp differ diff --git a/public/screenshots/send-request/grpc/grpc-streams/req-level-proto-file.webp b/public/screenshots/send-request/grpc/grpc-streams/req-level-proto-file.webp new file mode 100644 index 00000000..0b3ddf27 Binary files /dev/null and b/public/screenshots/send-request/grpc/grpc-streams/req-level-proto-file.webp differ diff --git a/public/screenshots/send-request/grpc/req-level-proto-file.webp b/public/screenshots/send-request/grpc/req-level-proto-file.webp new file mode 100644 index 00000000..0b3ddf27 Binary files /dev/null and b/public/screenshots/send-request/grpc/req-level-proto-file.webp differ diff --git a/src/pages/send-requests/_meta.js b/src/pages/send-requests/_meta.js index e4dca924..49d8d2d1 100644 --- a/src/pages/send-requests/_meta.js +++ b/src/pages/send-requests/_meta.js @@ -3,5 +3,6 @@ export default { "REST": "REST", "graphql": "GraphQL", "soap": "SOAP", + "grpc": "gRPC", "res-data-cookies": "Response Data and Cookies" } \ No newline at end of file diff --git a/src/pages/send-requests/grpc/_meta.js b/src/pages/send-requests/grpc/_meta.js new file mode 100644 index 00000000..3948a84e --- /dev/null +++ b/src/pages/send-requests/grpc/_meta.js @@ -0,0 +1,6 @@ +export default { + "overview": "Overview", + "grpc-request": "Create Request", + "grpc-proto": "Proto Files", + "grpc-streams": "Streams" +} \ No newline at end of file diff --git a/src/pages/send-requests/grpc/grpc-proto.mdx b/src/pages/send-requests/grpc/grpc-proto.mdx new file mode 100644 index 00000000..8fae92f1 --- /dev/null +++ b/src/pages/send-requests/grpc/grpc-proto.mdx @@ -0,0 +1,31 @@ +# gRPC Proto Files + +Proto files (`.proto`) are the foundation of gRPC services, defining the contract between clients and servers. Bruno supports adding proto files to enhance your gRPC development experience with better IntelliSense, method discovery, and type safety. + +## Proto File Options + +You have two ways to add Proto files for enhanced IntelliSense and method discovery: + +**Option 1: Request Level** + +1. Open your gRPC request in Bruno +2. In the gRPC interface, locate the **Using Reflection** section +3. Click on the **Browse for proto file** button or toggle the proto file option +4. Click the file browser to select `.proto` files from your local system + +![Request Level Proto File](/screenshots/send-request/grpc/req-level-proto-file.webp) + +**Option 2: Collection Level** + +1. Go to collection level settings +2. Navigate to the **gRPC** tab +3. Click the **Browse for proto files** to select `.proto` files from your local system + +![Collection Level Proto File](/screenshots/send-request/grpc/coll-level-proto-file.webp) + + +Add Proto files at the collection level for reuse across all requests. + +Bruno will validate that the selected files are valid proto files. +You can add multiple proto files if your service uses imports or multiple definitions. + diff --git a/src/pages/send-requests/grpc/grpc-request.mdx b/src/pages/send-requests/grpc/grpc-request.mdx new file mode 100644 index 00000000..d7966ea3 --- /dev/null +++ b/src/pages/send-requests/grpc/grpc-request.mdx @@ -0,0 +1,58 @@ +import {Callout} from "nextra/components"; + +# gRPC Request + +Bruno provides comprehensive support for gRPC requests, enabling you to test and interact with gRPC services directly from the interface. With Bruno's gRPC support, you can: + +- **Add Proto files** for enhanced IntelliSense and method discovery +- **Use Server Reflection** as an alternative to Proto files for automatic method suggestions +- **Call server methods** with full parameter support and type validation +- **Test real-time streaming APIs** including unary, server streaming, client streaming, and bidirectional streaming + +## gRPC Interface + +Bruno gRPC interface provides an intuitive way to interact with gRPC services. The interface automatically adapts based on whether you're using Proto files or Server Reflection. + +![gRPC Interface](/screenshots/send-request/grpc/1-grpc-interface.webp) + +## Creating a gRPC Request + +### Step 1: Enable gRPC Support + +First, you need to enable gRPC support in Bruno's beta features: + +1. Go to **Settings** > **Beta** +2. Check the **Enable** checkbox for gRPC support + +![Enable gRPC Support](/screenshots/send-request/grpc/1-enable.grpc-support.webp) + +### Step 2: Create a gRPC Request + +1. Open the collection context menu and select **New Request** from the dropdown +2. Select **gRPC** as your request type +3. Enter the **service endpoint** in the URL field (e.g., `https://grpcb.in/`) + +![Create gRPC Request](/screenshots/send-request/grpc/2-create-grpc-req.webp) + +### Step 3: Configure the Request + +1. Click on **Reflection** and choose the **method** you want to call from the dropdown + + + **Refresh**: The gRPC refresh feature caches server information in memory for better performance. If you're running a local gRPC server and make changes to your service definitions, click the **Refresh** button next to the **Using Reflection** toggle to reload the latest changes from your server. + + +2. Add any **required inputs** in the message section (auto generate with **Auto Fill** button) + +![Select Method](/screenshots/send-request/grpc/3-select-method.webp) + +### Step 4: Send the Request + +Click the **Send** button to execute your gRPC request. + +![Add Message and Receive Response](/screenshots/send-request/grpc/4-add-msg-receive-resp.webp) + +You'll see the response in the **Response** section with detailed information about the request execution. + + +To learn about proto files, navigate to the [Adding Proto file section.](./grpc-proto.mdx) \ No newline at end of file diff --git a/src/pages/send-requests/grpc/grpc-streams.mdx b/src/pages/send-requests/grpc/grpc-streams.mdx new file mode 100644 index 00000000..2041c95b --- /dev/null +++ b/src/pages/send-requests/grpc/grpc-streams.mdx @@ -0,0 +1,61 @@ +# gRPC Streams + +gRPC streaming enables real-time, bidirectional communication between clients and servers. Bruno supports all four types of gRPC streaming patterns, allowing you to test and interact with streaming APIs efficiently. + +## Understanding gRPC Streaming + +gRPC streaming allows you to send and receive multiple messages over a single connection, making it ideal for: +- **Unary streaming** (simple request-response, CRUD operations, authentication) +- **Client streaming** (batch processing, data collection) +- **Server streaming** (real-time notifications, live data feeds, progress updates) +- **Bidirectional streaming** (chat applications, collaborative editing, gaming) + +## Streaming Workflow + +### Step 1: Configure Request + +1. Open your collection and create a new gRPC request +2. Add your gRPC server URL (e.g., `https://grpcb.in/`) +3. Select a streaming method from the dropdown + +![Select Streaming Method](/screenshots/send-request/grpc/grpc-streams/1-grpc-select-stream.webp) + +### Step 2: Auto-Generate or Add Proto Files + +You have two options to add message schema: + +**Option A: Auto-Generate Messages** +- Bruno can auto-generate message templates based on server reflection (Click the **Auto Fill** 🔄 button) +- This works when your gRPC server has reflection enabled + +**Option B: Add Proto Files** +- Upload your `.proto` files (request or collection level) for enhanced IntelliSense +- Provides better type safety and method discovery + +![Auto-Fill gRPC Messages](/screenshots/send-request/grpc/grpc-streams/2-autofill-grpc-msg.webp) + +### Step 3: Build Stream Connection + +1. **Start Stream**: Click the send button to establish the bidirectional connection + +![Building Stream Connection](/screenshots/send-request/grpc/grpc-streams/3-building-stream-conn.webp) + +### Step 4: Send Multiple Messages + +Once the stream is active: + +1. **Send Message**: Click the **Send gRPC Message** button to transmit your message (next to **Auto Fill** button) +2. **Add More Messages**: Continue sending additional messages using **Add Message** + +![Add Multiple Messages](/screenshots/send-request/grpc/grpc-streams/4-add-multiple-msg.webp) + +### Step 5: End Stream and View Timeline + +1. **End Message Stream**: Click the ✓ icon (end stream button) to stop sending messages +3. **View Response Timeline**: See the complete conversation timeline with timestamps + +![gRPC Response Timeline](/screenshots/send-request/grpc/grpc-streams/5-grpc-res.webp) + + + + diff --git a/src/pages/send-requests/grpc/overview.mdx b/src/pages/send-requests/grpc/overview.mdx new file mode 100644 index 00000000..497db27f --- /dev/null +++ b/src/pages/send-requests/grpc/overview.mdx @@ -0,0 +1,17 @@ +import {Callout} from "nextra/components"; + +# Overview + + + gRPC is available in beta mode in [Bruno 2.10.0](https://www.usebruno.com/downloads) and higher versions. + + +gRPC (Google Remote Procedure Call) is a modern, high-performance Remote Procedure Call (RPC) framework developed by Google. It's designed for efficient communication when one service needs to interact with another. + +Imagine your Authentication Service needs to tell your Notification Service to send an OTP. In a high-traffic scenario, traditional request-response calls (like REST over HTTP/1.1) can be less efficient and introduce latency. + +gRPC solves this by faster communication, efficient data transfer and streaming capabilities. + + +Feel free to explore our sample [gRPC collection](https://github.com/bruno-collections/gRPC-api-collection) to play around. +