requestor job to support additional headers
See original GitHub issueThis is a note from Simon - Please raise an enhancement request issue for the requestor job to support additional headers - these should support env vars which will allow you to specify the bearer token.
This is the issue / feature I would request:
I set up a requestor for a valid request that I captured. The requestor does not let me add the bearer token needed for authorization.
For example, this is the request as captured:
POST https://api.mydomain.com/search HTTP/1.1
Content-Type: application/json
Authorization: Bearer <A Bunch of data that represents the token...>
Content-Length: 162
Host: api.mydomain .com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.12 (Java/11.0.12)
{<SOME DATA>}
The request job in the yaml looks like this:
jobs:
- parameters:
user: ""
requests:
- url: "https://api.mydomain.com/search"
name: ""
method: "POST"
data: "{<SOME DATA>}"
responseCode: 200
name: "requestor"
type: "requestor"
Can I somehow paste the valid token in the yaml file? If so what is the syntax?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:27 (27 by maintainers)
Top Results From Across the Web
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 >Adding custom headers to origin requests - Amazon CloudFront
To configure a distribution to add custom headers to requests that it sends to your origin, update the origin configuration using one of...
Read more >How do I add custom headers to a request (ASP.Net 2.0)?
I have a need to add custom headers to a request before it is processed. I first created an HttpModule but quickly found...
Read more >How do I send GET Request with Custom Headers? - ReqBin
Custom headers are intended to provide additional information related to the current request or response, or for troubleshooting purposes. Custom header fields ...
Read more >Create custom headers in backend services | Load Balancing
Working with custom request headers · Go to the load balancing summary page. · Click Backends. · Click the name of a backend...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So as discussed in IRC channel, the solution to above issue is that I wasn’t deploying the changes to Zap Add on, each code change needs to be replicated to the addon file as zap reads the changes from addon file. The solution is to run
gradlew addOns:automation:copyZapAddOn
when Zap changes needs to be deployed. This needs to be run whenever I want to see the changes. To check if the addon is deployed properly or not, go to zap --> addons --> automation --> click on it and see where the plugins are being stored, go to that directory and check if the addon file (automation-beta) in this case has updated or not?You need to provide more details, the
JobUtils
is able to copyList
.No, it’s not a workaround it’s what needs to be done, otherwise you are breaking other add-ons that are using that constructor.
Make sure it’s proper JavaDoc rather than plain code comments though.