firecamp-io / firecamp

VSCode for APIs, Postman Alternative.
https://firecamp.dev
317 stars 22 forks source link

Allow for overwriting Content-Length header field #77

Closed pavelsaman closed 4 years ago

pavelsaman commented 4 years ago

I guess this is more of a feature than a bug.

  1. problem

Content-Length is always automatically computed by Firecamp. That's not a problem unless users want to test how their server implementations handle wrong header field sections when e.g. a wrong value of Content-Length is sent.

  1. steps to reproduce

create an API req with a header field Content-Length => send the API req

  1. current behaviour

Custom made Content-Length is not used in requests, it's discarded and the value that Firecamp computes is used instead:

image

  1. desired behaviour

Allow for overwriting any header fields. In this example, the request would look like:

--------------Request Headers---------------

> POST /abc HTTP/1.1
> Host: localhost:5000
> User-Agent: Firecamp/1.0.0
> Accept: */*
> content-type: application/json
> Content-Length: 180
  1. version

snap, v1.0.0

Nishchit14 commented 4 years ago

released under v1.0.1

@pavelsaman feel free to reopen it if the issue still exits :)

Users can choose to set it via config in the request. image