Skip to content

Conversation

@chenjiayi3701-lgtm
Copy link

Why this change?

  1. Structured response data: Wraps body into a response object and adds a contentType: "application/json" field. This allows the backend to know the MIME type when processing the response.
  2. Conditional addition: The response field is only added when the user provides the --body parameter, avoiding passing unnecessary null values.
  3. Extensibility: The new structure allows adding more properties to the response object in the future (such as statusCode, headers, etc.) without adding more top-level fields.
  4. Backend API alignment: This structure better aligns with common API design patterns for network interception/mock responses. The backend likely expects this nested format to properly handle route interception responses.

Why this change?                                                                                         
                                                                                                           
  1. Structured response data: Wraps body into a response object and adds a contentType: "application/json"
   field. This allows the backend to know the MIME type when processing the response.                      
  2. Conditional addition: The response field is only added when the user provides the --body parameter,   
  avoiding passing unnecessary null values.                                                                
  3. Extensibility: The new structure allows adding more properties to the response object in the future   
  (such as statusCode, headers, etc.) without adding more top-level fields.                                
  4. Backend API alignment: This structure better aligns with common API design patterns for network       
  interception/mock responses. The backend likely expects this nested format to properly handle route
  interception responses.
@vercel
Copy link
Contributor

vercel bot commented Feb 6, 2026

@chenjiayi3701-lgtm is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant