Provide a variable to access the request information
See original GitHub issueProvide a variable, similar to response
, which can make it easier to access the information about the request sent by Karate. The rationale is to make the request and response available to external Java classes accessed through Java Interop.
More details available on the StackOverflow question, https://stackoverflow.com/questions/46846367/accessing-the-built-request-details-in-karate/
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Provide a variable to access the request information · Issue #226
Provide a variable, similar to response, which can make it easier to access the information about the request sent by Karate.
Read more >Use parameters to ask for input when running a query
To make a query in Access desktop databases ask for criteria when you run it, create a parameter query. This allows you to...
Read more >How do I access the request object or any other variable in a ...
The answer by Ber - storing it in threadlocals - is a very bad idea. There's absolutely no reason to do it this...
Read more >Passing variables between pages using URL GET or POST ...
There are different ways by which values of variables can be passed between pages. One of the ways is to use the URL...
Read more >can we access variables which are available in request ...
I am trying to use variables which are available for the requested item if yes which method I need to use to access...
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
@ptrthomas Makes sense. Saw that you have already changed the name. Thanks for making this update.
@createam great. actually I thought hard about it. each built-in variable adds bloat to the context, which becomes painful especially when doing a
call
to other features - since the return value is an aggregate of all variables. so considering that this is a 0.01 % use case (you are the first to request this) I felt this is better. plus it would be for those who are writing frameworks on top of karate like you are, and know what you are doing. the other consideration is it gets low-level, for e.g. the request body is held as a byte-array, which you need to deal with.I’m thinking that
karate.prevRequest
might be a slightly better name, what do you think ?