HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Questions on the Javascript framework behind Vanilla

I was searching if there was another attempt for POST requests from JavaScript then the jQuery approach. I like to avoid jQuery if possible. In the file "quote.tsx" I found the following snippet:

           void api
               .post("/rich/quote", {
                   body,
                   format: this.quoteData.format,
               })
               .then(response => {
                   this.setState({ renderedBody: response.data.quote }, this.props.onRenderComplete);
               });


When searching, I found a few references to api.post but also to apiv2.... What I was not able to find was where that is defined. I would like to know how to use that instead of the $.POST from jQuery or if it is thought or suited as a replacement.

Has anyone any idea on that?

Tagged:

Comments

Sign In or Register to comment.