insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Extra space formatting issue in 'Response => Body Attribute'

Open lennertvandevelde opened this issue 1 year ago • 1 comments

Expected Behavior

Chaining requests in order to get a bearer token from an ROPC-request. It should be able to return the token and fill it into Authorization: Bearer.

Actual Behavior

The token generation and passing works, but the formatting in the headers seems to be wrong.

image

Returns this header image which yields a 401.

image

here you can see an extra space is added.

When filling in the same token statically, the call will work.

Reproduction Steps

  1. Go to the Barer tab on any call.
  2. Fill in a Response => Body Attribute as Token.
  3. Send request
  4. Watch in Timeline and see an extra space is added after Authorization: Bearer

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2023.2.2

What operating system are you using?

Windows

Operating System Version

Windows 11 Pro 22H2

Installation method

download from insomnia.rest

Last Known Working Insomnia version

No response

lennertvandevelde avatar Jun 08 '23 08:06 lennertvandevelde

Based on your first photo, it looks like there's a space in the Token input before the Response => Body Attribute tag.

The current behavior that you're showing here may be intentional; however, I can't think of a case where having a leading/trailing space would be useful.

I'll submit a pull request for review; if this behavior is intentional, please feel free to provide further feedback.

branbarh avatar Apr 11 '24 01:04 branbarh