certinia / ffhttp-core Goto Github PK
View Code? Open in Web Editor NEWApex framework to provide functionality for HTTP callouts
License: BSD 3-Clause "New" or "Revised" License
Apex framework to provide functionality for HTTP callouts
License: BSD 3-Clause "New" or "Revised" License
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?
I have an API which returns BLOB content(Get request), however the API fails to parse the file content in correct format.
I did a global search to realise parse method always returns response.getBody() and blob contents(like images and videos) are corrupted.
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
Is there a better way to handle this? maybe make executeUnparsed() method virtual?
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
Any ideas on how to further troubleshoot this? The last message on this post mentions a similar problem.
Thanks so much!
Marisa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.