Skip to content

Conversation

@millermedeiros
Copy link

  • Centralize the XHR header logic into the transport itself since it's needed by all the requests, removing the need of the individual transformRequest calls.
  • Remove request.basic since it can be represented as a plain object.
  • Instead of using instanceof we check if generated requests contains the desired properties.
  • Remove the Request constructor since it wasn't doing anything and was introducing an extra level of indirection and used a JSDoc @typedef instead.
  • Simplified the way XML templates are interpolated in the requests.

 - Centralize the XHR header logic into the transport itself since it's
   needed by all the requests, removing the need of the individual
   `transformRequest` calls.

 - Remove `request.basic` since it can be represented as a plain object.

 - Instead of using `instanceof` we check if generated requests contains
   the desired properties.

 - Remove the `Request` constructor since it wasn't doing anything and
   was introducing an extra level of indirection and used a JSDoc
   @typedef instead.

 - Simplified the way XML templates are interpolated in the requests.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 94.69% when pulling fb1b3aa on millermedeiros:simplify_requests into e7e196c on gaye:master.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I probably wrote this for the case when we get an options without props (we really shouldn't?) but I think the template might require props?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants