Skip to content

EndpointRequest customization #211

@edygar

Description

@edygar

Could https://github.com/WP-API/node-wpapi/blob/master/lib/endpoint-factories.js#L41 refer to handlers[ resource ].Ctor instead directly to var EndpointRequest?

I need to inject some code before and after any of the _httpMethod are called but the way it is today, I would need to actually mutate each EndpointRequest instance where I could just inherit from them. Also,invokeAndPromisify been privated locks me of just overriding it.

Can somebody help me? My intention is to have access to the RequestData itself, so I could resolve locally when possible (as for local cache or optimistic updates)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions