### Install Go REST Client Source: https://github.com/bmcszk/go-restclient/blob/master/README.md Install the library using the go get command. ```bash go get github.com/bmcszk/go-restclient ``` -------------------------------- ### Example .http File Source: https://github.com/bmcszk/go-restclient/blob/master/README.md Defines a GET request for user profile and a POST request to create a new user, using variables and system variables. ```http @baseUrl = https://api.example.com @userId = 123 ### Get user profile GET {{baseUrl}}/users/{{userId}} Authorization: Bearer {{authToken}} X-Request-ID: {{$guid}} ### Create new user POST {{baseUrl}}/users Content-Type: application/json { "id": "{{$randomInt 1000 9999}}", "name": "Test User", "createdAt": "{{$timestamp}}" } ``` -------------------------------- ### Unit Test Structure Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Illustrates a typical Go unit test structure using testify/assert for setup, execution, and assertion phases. ```go func TestFunction_Scenario_ExpectedResult(t *testing.T) { // given setup := setupTestData() // when result, err := functionUnderTest(setup.input) // then assert.NoError(t, err) assert.Equal(t, setup.expected, result) } ``` -------------------------------- ### Complete Basic HTTP Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md A comprehensive example demonstrating variable usage, multiple GET/POST/PUT requests, and dynamic data generation for request parameters and bodies. ```http @baseUrl = https://api.example.com @apiVersion = v1 ### Get all users # @name getUsers GET {{baseUrl}}/{{apiVersion}}/users Accept: application/json ### Get specific user GET {{baseUrl}}/{{apiVersion}}/users/{{$randomInt 1 100}} Accept: application/json ### Create new user POST {{baseUrl}}/{{apiVersion}}/users Content-Type: application/json X-Request-ID: {{$guid}} { "name": "John Doe", "email": "john.doe{{$randomInt}}@example.com", "created_at": "{{$isoTimestamp}}" } ### Update specific user PUT {{baseUrl}}/{{apiVersion}}/users/{{getUsers.response.body.users[0].id}} Content-Type: application/json { "name": "Updated Name", "email": "updated.email@example.com" } ``` -------------------------------- ### Basic Authentication Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Demonstrates how to perform Basic Authentication by providing credentials in the Authorization header. ```http GET https://httpbin.org/basic-auth/user/pass Authorization: Basic dXNlcjpwYXNz ``` -------------------------------- ### Basic Authentication Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Demonstrates how to use Basic Authentication with a hardcoded token. ```http GET https://example.com/api/secure Authorization: Basic dXNlcjpwYXNzd29yZA== ``` -------------------------------- ### Mock Assertions Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Shows how to set expectations on a mock client and assert that those expectations were met after test execution. ```go mockClient.On("Do", mock.Anything).Return(expectedResponse, nil) // ... test code ... mockClient.AssertExpectations(t) ``` -------------------------------- ### Component Test Structure Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Demonstrates a Go component test structure for executing HTTP requests using a client and validating the response. ```go func TestClient_ExecuteHTTPRequest(t *testing.T) { // given client := NewClient() testData := loadHTTPFile("simple_get.http") // when result, err := client.ExecuteFile(testData) // then assert.NoError(t, err) assert.Equal(t, http.StatusOK, result.StatusCode) } ``` -------------------------------- ### JSON Comparison Test Data Examples Source: https://github.com/bmcszk/go-restclient/blob/master/docs/prds/json_comparison_whitespace_agnostic_prd.md Examples of JSON payloads used for testing, demonstrating expected formatted JSON, minified JSON, and JSON with varied whitespace, all of which should be considered equivalent for comparison. ```json // Expected (formatted) { "name": "test", "value": 42 } // Actual (minified) - should match {"name":"test","value":42} // Actual (different whitespace) - should match { "name" : "test" , "value" : 42 } ``` -------------------------------- ### Request-Specific Options Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Illustrates how to apply request-specific options like disabling redirects or cookie jars using comment lines. ```http # @name getUsersList # @no-redirect # @no-cookie-jar ``` -------------------------------- ### Bearer Token Authentication Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md An example of using Bearer Token authentication in an HTTP request. ```http GET https://example.com/api/secure Authorization: Bearer token123 ``` -------------------------------- ### Form Data Request Body Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md An example of sending form-urlencoded data in a POST request. ```http POST https://example.com/api/users Content-Type: application/x-www-form-urlencoded name=User&email=user@example.com ``` -------------------------------- ### Bearer Token Authentication Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Shows how to use a Bearer token for authentication by including it in the Authorization header. ```http GET https://api.example.com/secure Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... ``` -------------------------------- ### Short Form GET Request Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md For GET requests, the method can be omitted for a shorter syntax. ```http https://example.com/api/users ``` -------------------------------- ### Multipart Form Data Request Body Example Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md An example of sending multipart form data, typically used for file uploads or complex forms. ```http POST https://example.com/api/users Content-Type: multipart/form-data; boundary=WebAppBoundary --WebAppBoundary Content-Disposition: form-data; name="name" User --WebAppBoundary Content-Disposition: form-data; name="email" user@example.com --WebAppBoundary-- ``` -------------------------------- ### Basic GET Request Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md A minimal HTTP request requires a method and a URL. ```http GET https://example.com/api/users ``` -------------------------------- ### Use System Variable {{$guid}} in URL Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Utilizes the {{$guid}} system variable within a request URL. The library generates a unique GUID for each instance of the variable. ```http GET https://example.com/{{$guid}}/{{$guid}} ``` -------------------------------- ### Chained Requests with Token Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Demonstrates a POST request to obtain a token, followed by a GET request using that token in the Authorization header. The `@name` directive is used to reference the response of the first request. ```http ### Get authentication token # @name getToken POST https://example.com/api/login Content-Type: application/json { "username": "test", "password": "password" } ### Use token for authenticated request GET https://example.com/api/secure Authorization: Bearer {{getToken.response.body.token}} ``` -------------------------------- ### Parse Simple GET Request from .http File Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Parses a basic GET request from an .http file. Verifies correct extraction of method, URL, and absence of headers or body. ```http GET https://jsonplaceholder.typicode.com/todos/1 ``` -------------------------------- ### JetBrains Faker Library Variables Examples Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Demonstrates the usage of various Faker library variables for generating random data within JetBrains HTTP Client requests. ```plaintext {{$random.name.firstName}} - Random first name {{$random.address.city}} - Random city name {{$random.finance.creditCard}} - Random credit card number ``` -------------------------------- ### Parse GET Request with Headers from .http File Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Parses a GET request including headers from an .http file. Verifies correct extraction of method, URL, and specified headers. ```http GET https://jsonplaceholder.typicode.com/todos/1 Accept: application/json User-Agent: go-restclient-test ``` -------------------------------- ### Query Parameters on Multiple Lines Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md VS Code REST Client supports spreading query parameters across multiple lines for readability. Lines starting with '?' or '&' after the request line are parsed as query parameters. ```http GET https://example.com/comments ?page=2 &pageSize=10 &filter=active ``` -------------------------------- ### Configure Client Options in Go Source: https://github.com/bmcszk/go-restclient/blob/master/README.md Demonstrates configuring the Go REST Client with base URL, default headers, custom HTTP client, and variables. ```go client, err := restclient.NewClient( restclient.WithBaseURL("https://api.example.com"), restclient.WithDefaultHeader("X-API-Key", "secret"), restclient.WithHTTPClient(customHTTPClient), restclient.WithVars(variables), ) ``` -------------------------------- ### Basic GET Request Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md A simple GET request to an API endpoint. The `@no-log` directive excludes this request from history logs. ```http # @no-log GET https://example.com/api/users ``` -------------------------------- ### GET Request with Redirect Disabled Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md A GET request where the `@no-redirect` directive prevents the client from automatically following HTTP redirects. ```http # @no-redirect GET https://example.com/redirect ``` -------------------------------- ### Run Quick Tests Source: https://github.com/bmcszk/go-restclient/blob/master/README.md This Go command performs a quick test of the current package. ```bash go test . ``` -------------------------------- ### Use Process Environment Variable Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Shows how to access environment variables using the $processEnv system variable. Assumes the environment variable is set. ```go GET https://api.example.com/env?home={{$processEnv HOME}} ``` -------------------------------- ### Mock HTTP Client Implementation Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Provides a mock implementation of an HTTP client using testify/mock for dependency injection in tests. ```go type MockHTTPClient struct { mock.Mock } func (m *MockHTTPClient) Do(req *http.Request) (*http.Response, error) { args := m.Called(req) return args.Get(0).(*http.Response), args.Error(1) } ``` -------------------------------- ### Use Local Datetime Variable Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates the usage of the $localDatetime system variable with a specific format string. ```go GET https://api.example.com/time?ts={{$localDatetime 'YYYY-MM-DD HH:mm'}} ``` -------------------------------- ### Automated E2E Test for User API Source: https://github.com/bmcszk/go-restclient/blob/master/README.md This Go function demonstrates how to set up a REST client, execute a test file containing HTTP requests, and validate the responses against expected results. ```go func TestUserAPI(t *testing.T) { client, _ := restclient.NewClient( restclient.WithBaseURL(testServer.URL), ) responses, err := client.ExecuteFile(context.Background(), "user_tests.http") require.NoError(t, err) err = client.ValidateResponses("user_expected.hresp", responses...) require.NoError(t, err) } ``` -------------------------------- ### Comments in HTTP Requests Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Lines starting with '#' or '//' are treated as comments and ignored. ```http # This is a comment GET https://example.com/api/users ``` -------------------------------- ### Named Requests Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Requests can be named using a comment starting with '###' followed by the name. ```http ### Get Users GET https://example.com/api/users ### Create User POST https://example.com/api/users ``` -------------------------------- ### Use Dotenv Variable with Custom Path Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates specifying a custom path to a .env file for the $dotenv system variable. ```go GET https://api.example.com/custom-dotenv?var={{$dotenv DOTENV_PATH=/custom/path/.env CUSTOM_VAR}} ``` -------------------------------- ### Use Dotenv Variable Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Illustrates accessing variables defined in a .env file using the $dotenv system variable. The .env file should be in the request file's directory. ```go GET https://api.example.com/dotenv?var={{$dotenv DOTENV_VAR}} ``` -------------------------------- ### Basic Authentication with Variables Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Shows Basic Authentication where username and password are provided via variables. ```http @username = user @password = password GET https://{{username}}:{{password}}@example.com/api/secure ``` -------------------------------- ### Run All Tests Command Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Executes all tests, including unit and component tests. ```bash make test ``` -------------------------------- ### Pre-commit Check Command Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Runs linting and unit tests for a fast pre-commit validation. ```bash make check ``` -------------------------------- ### Run Unit Tests Command Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Executes only the unit tests for fast feedback during development. ```bash make test-unit ``` -------------------------------- ### Execute .http File in Go Source: https://github.com/bmcszk/go-restclient/blob/master/README.md Executes requests defined in an .http file using the Go REST Client library and logs the responses. ```go package main import ( "context" "log" "github.com/bmcszk/go-restclient" ) func main() { client, err := restclient.NewClient( restclient.WithVars(map[string]interface{}{ "authToken": "your-token-here", }), ) if err != nil { log.Fatal(err) } responses, err := client.ExecuteFile(context.Background(), "requests.http") if err != nil { log.Fatal(err) } for i, resp := range responses { if resp.Error != nil { log.Printf("Request %d failed: %v", i+1, resp.Error) } else { log.Printf("Request %d: %d %s", i+1, resp.StatusCode, resp.Status) } } } ``` -------------------------------- ### Programmatic Custom Variables for ExecuteFile - Nil Map Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates that passing a nil map of variables to ExecuteFile results in no error, and only file-defined variables are used. ```go // Pass nil as the variables map to ExecuteFile // File content: // @fileVar = file_value // GET /path?p1={{fileVar}} ``` -------------------------------- ### Accessing Shared Variables in Environment Definitions Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Demonstrates how to reference shared variables within environment definitions using JSON. ```json { "$shared": { "apiVersion": "v2", "defaultToken": "base-token" }, "development": { "host": "dev.example.com", "version": "{{$shared apiVersion}}", "token": "{{$shared defaultToken}}-dev" } } ``` -------------------------------- ### Run Single Test Command Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Executes a specific test case identified by its name. ```bash go test -run TestName ./... ``` -------------------------------- ### Make Check Command Details Source: https://github.com/bmcszk/go-restclient/blob/master/docs/testing-guidelines.md Details the components included in the `make check` command for pre-commit validation. ```bash make check # Runs: lint + test-unit ``` -------------------------------- ### Run E2E Tests with HTTP Files Source: https://github.com/bmcszk/go-restclient/blob/master/README.md This bash command executes all end-to-end tests located in the specified directory, which are defined using .http files. ```bash go test ./tests/e2e/... ``` -------------------------------- ### Reading Request Body from a File Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Shows how to use a file as the request body for any content type. ```http POST https://example.com/api/users Content-Type: application/json < ./path/to/payload.json ``` -------------------------------- ### Custom Variables in .http File Source: https://github.com/bmcszk/go-restclient/blob/master/README.md Demonstrates the use of custom variables for base URL and user ID in an HTTP request. ```http @baseUrl = https://api.example.com @userId = 123 GET {{baseUrl}}/users/{{userId}} ``` -------------------------------- ### Programmatic Custom Variables for ExecuteFile - No Override Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates that file-defined variables are used when not overridden by programmatic variables. ```go vars := map[string]string{"otherVar": "prog_value"} // File content: // @fileVar = file_value // GET /path?p1={{fileVar}}&p2={{otherVar}} ``` -------------------------------- ### Define and Use Custom Variable in Request URL Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates defining a custom variable for the host and using it within the request URL. Ensure the variable is defined before its first use. ```http @host = https://example.com GET {{host}}/users ``` -------------------------------- ### Programmatic Custom Variables for ExecuteFile - Empty Map Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Shows that passing an empty map of variables to ExecuteFile results in no error, and only file-defined variables are used. ```go vars := map[string]string{} // File content: // @fileVar = file_value // GET /path?p1={{fileVar}} ``` -------------------------------- ### Programmatic Custom Variables for ExecuteFile - URL Substitution Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Passes a map of custom variables to ExecuteFile, verifying substitution in the URL. The programmatic variables override file-defined variables. ```go vars := map[string]string{"userId": "prog_user_123"} // File content: // @baseUrl = https://file.example.com // GET {{baseUrl}}/path?user={{userId}} // Expected: Request sent to https://prog.example.com/path?user=prog_user_123 ``` -------------------------------- ### Handle File with Only Separators and Comments Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates the client's graceful handling of a file containing only '###' separators and comments, with no valid requests or responses. The parser should return an indication of no content found. ```http ### Comment 1 # More comments ### ### Comment 2 ``` -------------------------------- ### Programmatic Custom Variables for ExecuteFile - Header Substitution Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Passes a map of custom variables to ExecuteFile, verifying substitution in headers. The programmatic variables override file-defined variables. ```go vars := map[string]string{"authToken": "prog_token_abc"} // File content: // GET /data // Authorization: Bearer {{authToken}} ``` -------------------------------- ### Parse Request After Initial Empty/Comment Block Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates parsing a file that begins with an empty or comment-only block. The client correctly identifies and parses the first valid request following these blocks. ```http ### This is an initial empty block with a comment # Another comment ### GET https://example.com/api/valid ``` -------------------------------- ### Request with Headers Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Headers are added after the request line in a 'Name: Value' format. ```http GET https://example.com/api/users Accept: application/json Authorization: Bearer token123 ``` -------------------------------- ### Use System Variable {{$datetime}} with Time Format Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates using the {{$datetime}} system variable with a format string to represent the current time. The format 'HH:mm:ss' is applied. ```http GET https://api.example.com/time?current={{$datetime 'HH:mm:ss'}} ``` -------------------------------- ### Environment File Structure Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Environment variables are defined in a JSON file. The '$shared' section provides globally accessible variables, while named sections define environment-specific variables. ```json { "$shared": { "commonVar": "value-for-all-environments" }, "development": { "host": "dev.example.com", "version": "v1", "token": "dev-token" }, "production": { "host": "api.example.com", "version": "v2", "token": "prod-token" } } ``` -------------------------------- ### Request with HTTP Version Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md The HTTP version can be optionally specified after the URL. ```http GET https://example.com/api/users HTTP/1.1 ``` -------------------------------- ### OAuth Authentication Flow Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Illustrates an OAuth 2.0 client credentials flow. The first request obtains an access token, which is then used in subsequent authenticated requests. ```http ### OAuth Authentication Flow Example # @name getToken POST https://oauth.provider/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&client_id={{clientId}}&client_secret={{clientSecret}} ### # Using token from previous request GET https://api.example.com/secure Authorization: Bearer {{getToken.response.body.access_token}} ``` -------------------------------- ### File Upload using Multipart Form Data Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Shows how to upload a file as part of a multipart form data request. ```http POST https://example.com/api/upload Content-Type: multipart/form-data; boundary=WebAppBoundary --WebAppBoundary Content-Disposition: form-data; name="file"; filename="image.jpg" Content-Type: image/jpeg < ./path/to/local/image.jpg --WebAppBoundary-- ``` -------------------------------- ### Programmatic Custom Variables for ExecuteFile - Body Substitution Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Passes a map of custom variables to ExecuteFile, verifying substitution in the request body. The programmatic variables override file-defined variables. ```go vars := map[string]string{"orderId": "prog_order_456"} // File content: // POST /orders // Content-Type: application/json // // {"id": "{{orderId}}"} ``` -------------------------------- ### Multiple Requests in a Single File Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Use '###' to separate distinct HTTP requests within the same file. ```http GET https://example.com/api/users ### POST https://example.com/api/users Content-Type: application/json { "name": "User", "email": "user@example.com" } ``` -------------------------------- ### Request with Timeout Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Configures a request with a specific timeout duration in milliseconds. This is useful for preventing requests from hanging indefinitely. ```http # @timeout 5000 GET https://example.com/api/slow-resource ``` -------------------------------- ### Multi-line Form Data Request Body Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Demonstrates splitting form-urlencoded data into multiple lines for readability. ```http POST https://api.example.com/login Content-Type: application/x-www-form-urlencoded username=foo &password=bar &remember_me=true ``` -------------------------------- ### Parse POST Request with Plain Text Body from .http File Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Parses a POST request with a plain text body from an .http file. Verifies correct extraction of method, URL, Content-Type header, and the plain text body. ```http POST https://example.com/submit Content-Type: text/plain This is a plain text body. ``` -------------------------------- ### Chained Requests with Response Referencing Source: https://github.com/bmcszk/go-restclient/blob/master/docs/http_syntax.md Reference previous responses in subsequent requests using the '@name' syntax and response properties like 'response.body.token'. ```http ### Login Request # @name login POST https://example.com/api/login Content-Type: application/json { "username": "test", "password": "password" } ### Use token from login GET https://example.com/api/secured-resource Authorization: Bearer {{login.response.body.token}} ``` -------------------------------- ### Define and Use Custom Variable in Request Header Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Shows how to define a custom variable for authentication tokens and use it in the Authorization header. The variable must be defined prior to its usage. ```http @token = mysecrettoken GET https://api.example.com/data Authorization: Bearer {{token}} ``` -------------------------------- ### Parse Request with '###' Comment on Same Line Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Demonstrates parsing a file where a '###' comment appears on the same line as a request. The comment text is ignored, and subsequent requests are parsed correctly. ```http GET https://example.com/api/resource1 X-Test-Header: Value1 ### This is a comment for the first request block and should be ignored POST https://example.com/api/resource2 Content-Type: application/json {"key": "value"} ``` -------------------------------- ### Parse .http File with Variables Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Parses an .http file containing variables. Verifies that variables are correctly substituted before the request is processed. This scenario assumes REQ-LIB-007 is implemented. ```http @host = https://jsonplaceholder.typicode.com GET {{host}}/todos/1 ``` -------------------------------- ### Parse Response with '###' Comment on Same Line Source: https://github.com/bmcszk/go-restclient/blob/master/docs/test_scenarios.md Shows how the client parses response files when a '###' comment is on the same line. The comment is ignored, and valid responses are processed correctly. ```http HTTP/1.1 200 OK Content-Type: application/json {"status": "success"} ### This is a comment for the first response block HTTP/1.1 404 Not Found ```