|
Pay men rue poor Judge (10)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Remunerate ?
Anagram of men rue and rate (judge)
Pay = remunerate
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
You are up tomorrow!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
i have searched w/o success for software which outputs trace/logging info for each api call and which then permits playback . may i please inquire of any recommendations . thank you kindly
[EDIT] perhaps i should make clear the api to which i refer is my own i.e. not of OS . e.g. if a user calls my api and finds error he/she should be able to attempt repro w/ logging/tracing switched on in my library so i can then investigate upon playback .
modified 2 days ago.
|
|
|
|
|
I suggest two things:
* You can google "rest api recording" or "rest api recording proxy"
* please remove your post and use the Q&A
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
thank you for recommending the web searches though i wish what i found did not fly over my head but i am not certain what was found fits my request . as for my request apparently offending your kind self i do not understand why that should be so as requesting such minor and brief "technical" advice is not unheard of here on Lounge . i am certainly not the first or only . no doubt there will be more and from others . now they will know what to expect from your kind self . i will gratefully accept your kind advice perhaps for greater elaboration on Q&A but as Lounge is presumably more viewed it seems useful to not delete and perhaps obtain some more brief advice .
|
|
|
|
|
megaadam wrote: please remove your post and use the Q&A
why ? its not a programming question, it s something that other people might also find useful ?
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Its totally fine now to post programming questions in the lounge. Members answer programming questions in the Lounge all the time.
However, OP's question was not a "programming question", but who really cares.
|
|
|
|
|
I would suggest using standard logger like Serilog, or Log4Net and dump your jason or whatever you want to log. It will be more flexible and stable compared to some all-around solution. Also, a piece of advice - apart from logging your calls in a file/email, record every API response in the DB, including errors. All of it.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
It depends what your use case is. If you just want to intercept some API calls and play back to do some local testing, if they are HTTP/HTTPs based, you could always use Postman.
|
|
|
|
|
Are you on the server side or client side?
My latest experience with requesting/consuming data from a restful api has been dreadful.
If you are the provider, it's a pretty simple task to read your webserver logs into a gridview or something for analysis/playback. I know you probably don't want to roll your own, but it does have some real advantages.
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
thank you for your kind reply . i know nothing re/ servers or clients or restful's . my library/application has nothing to do w/ websites as i know nothing about internet programming . it is a simple interface to local permanent storage . it seems to my surprise an api-record/playback software does not exist . i am quite willing even happy to write my own as it does not seem particularly difficult and i expect i would find pleasure in its successful implementation . i still do not understand why such does not exist as it seems a useful tool which means a profitable tool which means thousands of superior programmers would have written such prior . -Best
|
|
|
|
|
BernardIE5317 wrote: my library/application has nothing to do w/ websites as i know nothing about internet programming . it is a simple interface to local permanent storage . it seems to my surprise an api-record/playback
Ah...
BernardIE5317 wrote: i still do not understand why such does not exist
Because it is not as easy as you think.
An application that uses libraries is making a call that is controlled by the programming language, compiler and even the OS.
At the most basic level you must do code injection just to interpret the call. This is how debuggers work.
However you also want the values that are being passed in to the call.
So you can do a 'playback'.
Values are passed by the stack however knowing that does not help much with playback because values are often pointers. So you would need to retrieve what is being pointed at.
But how do you know what is being pointed at so you can correctly walk that value to retrieve it? In general there is no way to know where a pointer ends without knowing what it is. And that becomes even worse if the object (space) being pointed to itself contains pointers. Debuggers do this because there is debug information stored (somewhere) that allows them to interpret that data - often dynamically as a user drills down on it.
Further there is another very serious problem. Some values that are passed are not designed to be read twice. For example lazy loaded collections. Even if you managed to reset such a collection after reading it, it is even possible that the api call then might get different values (for example if the collection pulls from a database.)
|
|
|
|
|
thank you for your informative reply . i envision it as follows . utilizing presumably Clang to parse the source file which i know little of which would deduce argument types then inject logging code into the source code at top of each function also into each class passed as arguments so such can log themselves also in similar fashion pointer targets can be logged again as Clang deduces types . as for lazy loading i have no idea what that is but i am sure my simple library does not utilize it . - Best
|
|
|
|
|
I apologise for my previous grumpy reply.
Like most folks above I assumed that your question was about a REST-API and... For your, now clarified, case I dunno about playback, but for recording: you can capture system calls. I.e intercept calls between your app and the system libraries (.DLLs / .SOs).
* Windows: apimonitor (GUI application)
* Linux: strace (command-line)
But... That is approach probably over the top if you only care about file-system events. For file system events there is
* .NET library: FileSystemWatcher
* Linux commandline: iwatch
* Cross Platform, build from C++: GitHub - emcrisostomo/fswatch[^]
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Sounds like you need "HTTP Toolkit"
https://httptoolkit.com/
Iv'e used this many, many times for live debugging over the years.
All the user needs to do is install it, then run it, they use an appropriate interception mode, to run the app with your lib in, under control of the toolkit, the free version is more than enough for standard debugging, but if you need to export the data you will need to pay for a subscription.
HTTP toolkit can even "live proxy" calls made on a mobile device such as an android phone, over your local lan via wifi and/or usb direct into the PC running HTTP Toolkit, it's really quite scary what you can do with it, I've watched (and seen in plain text) things like my MS and Google account passwords being revealed to me when set up properly.
If your feeling brave, and really understand HTTP and general networking, then Wireshark will do everything you need.
It's not easy to set WS up to decrypt HTTPS however, but it can be done, and the results can be un-encrypted.
WS will unfortunately record EVERYTHING network related going on in the target machine however, so you will need to learn to use a lot of filtering.
Telerik fiddler is another tool you may wish to look at, but the new versions are no where near as good as the old "Version 4 classic version". If you can get "Fiddler Classic" then you have a great tool, which is easy to set up for un-encrypting https in real time (One button click) and will allow you to sniff, record and even edit and play back requests.
Shawty
|
|
|
|
|
Wordle 639 3/6
⬛🟩⬛⬛🟩
🟩🟩🟩⬛🟩
🟩🟩🟩🟩🟩
So near on row 2!
|
|
|
|
|
Wordle 639 3/6
⬜⬜🟩⬜🟩
⬜⬜🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 639 3/6
⬛⬛⬛⬛🟩
⬛🟩🟩⬛🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 639 X/6
⬜⬜⬜🟨⬜
⬜⬜🟨⬜⬜
⬜🟨⬜🟨⬜
🟨🟨⬜🟨⬜
⬜🟩🟩⬜🟩
⬜🟩🟩🟩🟩
Lost today.
|
|
|
|
|
Wordle 639 4/6*
⬜⬜🟩⬜🟩
⬜🟩🟩⬜🟩
⬜🟩🟩⬜🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 639 4/6
⬜⬜⬜⬜🟩
⬜🟨⬜⬜⬜
⬜⬜🟨⬜⬜
🟩🟩🟩🟩🟩
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Wordle 639 5/6
⬜⬜⬜⬜⬜
⬜⬜🟨⬜🟨
⬜⬜🟨🟨⬜
⬜🟩🟩⬜🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 639 5/6*
⬜⬜⬜🟨⬜
🟨🟨⬜⬜⬜
⬜⬜⬜🟩🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
Wordle 639 4/6
⬜⬜⬜⬜🟩
⬜⬜⬜🟨🟩
🟨🟩⬜🟩🟩
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|