I'm writing a JavaScript function that makes an HTTP request and returns a promise for the result (but this question applies equally for a callback-based implementation).  If I know immediately that the arguments supplied for the function are i...
I'm using bluebird to design some nodejs api wrapper around an http service.  Many of the functions in this wrapper are asynchronous and so it makes a lot of sense to return promises from these implementation.   My colleague has been working on t...
I like the way Google Maps' api is consumed, using a script include, but I'm worried:  My api is "semi-private", that is, accessible over the internet but should allow for secure transmission of data and some kind of authentication. T...
I am new to API design and I am trying to implement an API call that simply displays data from an API server I found online using the vue.js project via CLI. Though I am able to see the results in the console of the browser, I am not able to see the...
I building a RESTful api and I need to get complex data from front-end. But I am not sure which one should I choose for POST data.  I should get prices for all possible routes of route group. An example: There's a bus, that's starts from port...
Apologies if this is a newbie question . How should I go about structuring my REST API (I use Node & Express).  const mongoose = require('mongoose');  const recipeSchema = mongoose.Schema({     _id: mongoose.Schema.Types.ObjectId,     nam...
This question already has answers here:...
SOLVED (see below)  I'm trying to create an API so that I can read in text (from a word document) and have the bot in botpress respond with a section of that text.  I'm confused about a couple of things:   What structure should my API follow...
How can I reformat this block in order to add sorting on the Name field?     Router.route('/hospitals/search/:searchString')       .get(function (req, res) {         const searchString = decodeURIComponent(req.params.searchString)         Hos...
Any thoughts on how specific API response messages should be? I'm looking at this from a Security perspective related to validating on data types.  Say my API requires string for an id and that my server validates the type - i...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.