Skip to main content

no-body-in-request-with-get-method

Overview

This rule belongs to the insomnia-validation ruleset and states that:

A request resource with method GET must not define a body (i.e. the request payload). This is because such methods do not expect a body and, therefore, all related information will be ignored automatically during import/transformations in APIMatic.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageRequest resource with method GET has defined body which will be ignored.
CodeINSOMNIA_V201
TypeValidation
Rule SystemSemantic
Broad CategoryRequests
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsinsomnia semantic validation body get method request

Suggested Fixes

  • Open the Body dropdown in the Insomnia app request and select No Body or an equivalent option from the list. Save and export your file again.
  • Remove body definition from the request resource in your Insomnia Export file.

For More Information