Skip to content
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

342 - (OC Client) Perform GET instead of POST for single component #347

Commits on Feb 16, 2017

  1. Change the OC Client to perform GET instead of POST when requesting j…

    …ust one component (opencomponents#342)
    
    Also:
    - Extended get-components-data error handling to anticipate a flat response
      with a single error field when a major 4xx error is detected for the request.
      In this case we extend the error message to provide as much data as possible.
    - Added more tests and fixed the existing ones.
    i-b-dimitrov committed Feb 16, 2017
    Configuration menu
    Copy the full SHA
    a8ea0d9 View commit details
    Browse the repository at this point in the history
  2. Added additional and separate parameter validation in href-builder.js

    - added a validation for null or empty component.name
    - added a validation for clientRenderingOptionsNotSet
    - the method is changed to not return null results - instead it will throw an
    exception
    i-b-dimitrov committed Feb 16, 2017
    Configuration menu
    Copy the full SHA
    ad19525 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    205a169 View commit details
    Browse the repository at this point in the history
  4. Added get-component-data tests

    - Added a test to validate that getting the data for just one component will
      result in a href-builder.prepareGetRequest call and that the result of it
      will subsequently be used as a URL for the actual call.
    - Added a test to validate that getting more than one component (two
      components) will not result in calling href-builder.prepareGetRequest and
      will construct the resulting URL based only on the URL returned by
      href-builder.server method.
    i-b-dimitrov committed Feb 16, 2017
    Configuration menu
    Copy the full SHA
    1b83d09 View commit details
    Browse the repository at this point in the history
  5. Refactored href-builder to reflect the code review notes

    - prepareServerGet was changed to use querystring.stringify for addign the
      component parameters as URL query params.
    - change the returned URL to include a trailing '/' before the URL query
      params (and thus making it to follow the same pattern as in client method)
    - changed the client.js acceptance test according to the aforementioned changes
    - added client-href-builder.js unit test
    i-b-dimitrov committed Feb 16, 2017
    Configuration menu
    Copy the full SHA
    d1e4949 View commit details
    Browse the repository at this point in the history