Giter Site home page Giter Site logo

ffhttp-core's People

Contributors

afawcett avatar dfruddffdc avatar imjohnmdaniel avatar mwoodffdc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffhttp-core's Issues

Multipart request parameters have trailing spaces

Just tried posting a multipart request against a testing endpoint (requestb.in) and noticed that many values and parameters have a trailing whitespace, my first guess could be that it could be something related to the addPadding method but not entirely sure.

For my point of understanding, the addPadding does ensure that the resulting value is correctly encoded, but to ensure that it starts adding whitespaces, is there a workaround to avoid sending values with trailing whitespaces to the receiving service?

Handeling 3xx Redirection error

I am trying to consume an API which returns 303 status code and redirect location.

In ffhttp_Client.AbstractClientRequest.executeUnparsed() method the code checks for status code between 300 and 400 and throws exception with message

3xx Redirection error which is currently unhandled

With this behavior response along with its header is lost.

The two solutions in the current approach are

  1. override handleRedirection() method and throw an exception with redirect URI or do nothing in the overridden method (A dirty fix)
  2. Implement IAbstractClientRequest interface and implement all the methods(Lot of redundant code)

Is there a better way to handle this? maybe make executeUnparsed() method virtual?

400 'Bad Request' with Refresh Token request

Hats off to you for an awesome set of Google libraries for Salesforce! My use case below works great until the access token expires. The ffhttp_OAuthClient class proceeds to send a request to obtain a new access token (using the refresh token) but the request fails with a 400 'Bad Request' response.

Use Case
Create folders and files in Google Drive in an 'after insert' trigger for a standard object.

Configuration
I'm using the Configuration setup outlined in the Google Drive API Framework project.

The refresh token request appears to be correct:
grant_type=refresh_token&client_id=1234567890123-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com&client_secret=XXXXXXXXXXXXXXXXX-YYYYYY&redirect_uri=https%3A%2F%2Fgoo.cs91.my.salesforce.com%2Fapex%2Fconnector&refresh_token=1/XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYYYYYYYYYYYY

Troubleshooting Steps

  1. re-creating the client credentials in Google Cloud Platform.
  2. re-creating the Connector Type and Connector.
  3. using 'access_type=offline' and 'access_type=offline&approval_prompt' in the Connector's Extra Url Parameters field.

Any ideas on how to further troubleshoot this? The last message on this post mentions a similar problem.

Thanks so much!

Marisa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.