I have like /1000+ users and want to send them in response to a single get request to show these users in admin panel table
Is these any way so that I can return response to a Single request in batch of 100 users per batch
Hi I would have explained more, but it is summarized pretty good here:
Processing Batch REST API requests in NodeJS Express framework
see swateek comment.
If you don't understand comment here and I will help.
Related
I'm setting up a website that will be mobile focused and one of the features I wan't to implement is users to be able to log an entry by just scanning a QR code.
For what I read is not really possible to make a POST request directly from a QR code, so I was thinking in two different options:
1. Make a GET request and then redirect that inside my server to a POST route in my routes.
So the URL would be something like https://example.com/user/resources/someresourceid123/logs/new and then this would create a POST request to https://example.com/user/resources/someresourceid123/logs/ and create the new entry to then send a response to the user but I'm not really sure this is the best approach or if it's possible at all.
My POST request only requires the resourceid which I should be able to get from req.params and the userid which I get from my req.user.
2. Do my logic and log the entry to my DB using the GET request to https://example.com/user/resources/someresourceid123/logs/new.
This would mean that my controller for that request will do everything needed from the GET request without having to make an additional POST request afterwards. I should be able to get both the resourceid and userid from the req object but not sure if being a GET request limits what I can do with it.
If any of those are possible, which would be the best approach?
I'd propose to go with a second option simply for the sake of performance. But you need to make sure your requests are not cached by any proxy, which is usually the case with GET requests.
I recently began working with JavaScript and am looking at various get and post requests one can send to a server.
For get, as far as I know, all of the information of the query is contained in the URL that the user triggers. On the server side this has to be dissected to retrieve the necessary parameters.
I was just wondering how larger and more detailed requests are handled with this get method? For instance what if I had millions and millions of parameters that make up my whole request? Would they all be jumbled into the URL? Is there a limit as to the number of unique URLs one can have? I read this post:
How do URL shorteners guarantee unique URLs when they don't expire?
I would really like some more input.
Thank You!
I am building a hotel search engine where I have 20 xml API integration. Now facing a problem of time laps in receiving all 20 xml responses from all API before binding the result page. I am looking for a solution where we can call all API parallel in multithreading and I want to show the api response as soon as I receive 1st response from any API and then merge next response from previous one and update the binding page. In this way I can show result of 1st few hotels starting from very 1st API response.
Please suggest me the way I can achieve my objective in asp.net c#. This is my 1st question in this forum and very eager to have feedback.
You would have to use javascript to display the responses fluently. Basically, have ASP.NET load an empty page then use javascript to call the 20 API endpoints. As the responses come in, update the display. Single page application (SPA) frameworks, such as Angular, are fantastic for these situations.
I am always and constantly getting the following error when trying to follow a user via instagram although the 5000 request limit hasn't been exceeded. Why is this?
{"meta":{"error_type":"APIError","code":400,"error_message":"Client request limit reached"}}
While API request with access token is 5000 (any API call), certain API like follow, unfollow, like, comment are limited to 350 an hour.
I had the same problem. In my case I sent post requets from server side (google app engine) and now I am sending post requests from client (with js) and it works well.
It depends on your request. Instagram has a new API limit, 100 likes/hr, 60 follow/unfollow/hr IF you authenticate server side and sign your headers, check out the Instragram authentication for developers.
I'm currently running a website: http://instapromobiz.com that automates likes/follows/unfollows using these restrictions. It works great, check it out.
I am working on an iPhone app which allows users to search Foursquare. I am using the venues/explore endpoint for the search which works great, but the results don't include the images for a place or the priceTier.
Right now I am calling /venues/VENUE_ID for each of the returned results, which is generating a lot of API calls. Is there a better way to get this info in a single call?
Related question: If I use the multi endpoint to batch these requests, does that count as a single request towards the limit or as multiple requests?
Sounds like you're worried about limits more than network latency? If you're worried that making the extra call to details will make you hit rate limits faster, this is actually why we generally ask developers to cache details such as prices or photos :) A single multi request is not a single API call; it counts as how many requests are bundled into one.
There is a little help with photos though—if you pass in the venuePhotos=1 param as part of an explore request, you ought to get back photos in the response.