Open tmkasun opened 3 years ago
Hey @tmkasun, exciting that WSO2 is evaluating elements for usage in dev portals. Can we setup a call to go through what you're looking to do and how we can possibly collaborate?
Hi @mnaumanali94 , Yeah that's great, Let's have a call, I sent a meeting invitation to your github email, Let me know whether that timeslot works for you, Else feel free to re-schedule the call.
Are there any updates to this feature request by any chance?
Hi @moon0326 ,
I check the latest code in the TryIt.tsx. It seems like now we can change the request parameters via onRequestChange
prop.
Haven't tested it though, So we might able to use that callback function to get to the request headers.
@mnaumanali94 can you shed some light on this ?
Thank you! I did not notice that. I'll look into it :)
User story.
As a developer I want to intercept the outgoing tryout HTTP request So that I can Inject / Update HTTP request parameters such as headers
UPDATE:
The above user story is actually kind of intermediate requirement, My final goal is to auto-populate the Authentication parameters
so, As an API Consumer I want to set my authentication parameter automatically So that I can avoid coping the parameters (I:e API Key, Bearer token) manually
Is your feature request related to a problem?
I can't add to change the Authorization header value or Add a custom HTTP header to the TryIt request
UPDATE:
As per the updated user story, My problem is, I can set the Authentication parameters programmatically, No prop or API in the Elements component to set the Operation Auth Value (
operationAuthValue
)Describe the solution you'd like
Expose a request interceptor interface, to modify this tryit fetch request parameters.
Additional context
As an example, In Swagger-UI library they expose a
requestInterceptor
parameter that users(library) can use to intercept any HTTP requests initiated from the swagger UI.