-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to create HttpClient or WebClient or HttpWebRequest objects from HAR object/file? #13
Comments
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 |
@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. |
@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 |
@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 |
Are there any plans to create
HttpClient
orWebClient
orHttpWebRequest
objects fromHAR
object/file?This will allow us to easily create
HttpClient
orWebClient
orHttpWebRequest
and quickly populate the relevant requestparameters/content/body
!!!The text was updated successfully, but these errors were encountered: