question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

headers parameter for responses.add

See original GitHub issue

Would it be possible for responses.add to support a headers parameter? Having to create a callback just to add headers seems a bit more work than it should be.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
prokaktuscommented, Aug 30, 2016

@hfaran If I understand correctly, adding_headers option is doing exactly what you want - add headers to response: https://github.com/getsentry/responses/blob/2b5e941657f2ded500af860dd069fb088e9e07f9/responses.py#L132

Maybe, this is should to be put into docs.

0reactions
hfarancommented, May 14, 2020

This issue is almost 5 years old now and I honestly have no idea what I was using this for at the time. This issue can be closed if someone who is a maintainer considers it fixed 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding or modifying headers on HTTP requests and ...
Create new headers · In the Name field, enter the name of your header rule (for example, My header ). · From the...
Read more >
Understanding REST Headers and Parameters
The REST headers and parameters contain a wealth of information that can help you track down issues when you encounter them. HTTP Headers...
Read more >
Response Headers - FastAPI
Create a response as described in Return a Response Directly and pass the headers as an additional parameter: from fastapi import FastAPI from ......
Read more >
HTTP headers - MDN Web Docs - Mozilla
HTTP headers let the client and the server pass additional information with an HTTP request or response. An HTTP header consists of its ......
Read more >
HTTP header fields and URI parameters
HTTP header fields · Accept: Specifies the content types that are valid in the response message. · Accept-Language: Sends the list of languages...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found