eugef / node-mocks-http

Mock 'http' objects for testing Express routing functions
Other
753 stars 133 forks source link

createRequest with text/plain #180

Closed neilpalima closed 4 years ago

neilpalima commented 5 years ago

Is there a way to create a request with content-type: text/plain header? I tried it but the body only expects an object.

Type 'string | object' is not assignable to type 'Body'.
  Type 'string' is not assignable to type 'Body'.ts(2322)
index.d.ts(47, 9): The expected type comes from property 'body' which is declared here on type 'RequestOptions'
github-actions[bot] commented 4 years ago

Stale issue message