Are there any plans to create HttpClient or WebClient or HttpWebRequest objects from HAR object/file?
Are there any plans to create HttpClient or WebClient or HttpWebRequest objects from HAR object/file?
This will allow us to easily create HttpClient or WebClient or HttpWebRequest and quickly populate the relevant request parameters/content/body !!!
If you don't have this plan, I would maybe consider implementing a component library on your own.
@VAllens - I'm checking out this library because my intention to to generate Swagger / OpenAPI specs from HAR files.
(Which in my opinion would be preferable to directly generating a HttpClient, since you can just generate practically anything once you have a swagger spec file)
Since you were considering implementing something similar, have you made any progress? Cause then I might be able to collaborate on your work or use parts of your work for my own project
@VAllens - I'm checking out this library because my intention to to generate Swagger / OpenAPI specs from HAR files.
(Which in my opinion would be preferable to directly generating a HttpClient, since you can just generate practically anything once you have a swagger spec file)
Since you were considering implementing something similar, have you made any progress? Cause then I might be able to collaborate on your work or use parts of your work for my own project
@RonSijm Hi, RonSijm.
Our goal may be different. My goal is to realize a semi-automatic test service.
After the user (exported from Fiddler or Chrome or other tools) imports the har file and fills in the URL, the service can request the URL at a specific time and do something.
At present, there is no progress. If there is progress, I will open source in GitHub.
@VAllens Sounds like you could do that in the way I was suggesting.
In my approach, once you have generated an OpenAPI spec file, you can easily read it in using Nswag or microsoft/OpenAPI.NET.
From there I made a small console app that sends all the operations through a Liquid Template (I already have that part working for existing OpenAPI spec docs, might release it once I have it all up and running) (If I can clear it from being proprietary)
So if you can convert Hars to OpenAPI, you can use a liquid template to generate the test services.
Only thing is that you'd have to compile the output of the liquid templates, so if your goal is to let end-users import a Har file and do everything you mentioned at runtime, then yea, my approach won't work for that
(Though I was doing something similar to that - doing everything at runtime reflection/parsing, but that approach is 100s of times slower than creating a code-generator first, compiling it, and using that)
I made some progress converting Hars into OpenAPI specs, but not enough to commit, hehe. There are a lot of things to map
@RonSijm Thank you for your suggestion, although it is not my desired goal. I'm glad you made progress. 😄
@VAllens Is this what you are looking for? https://github.com/nventive/HttpRecorder
@VAllens Is this what you are looking for? https://github.com/nventive/HttpRecorder
This is interesting.
It has part of the implementation I want.
Thank you for sharing. :) @Giorgi