New answers tagged rest
Best practices
1 vote
0 replies
0 views
Server side filtering
My 2c...the fact that you want to centralize that logic for maintainability is already the important goal, I wouldn't dwell too much on trying to select the perfect design pattern(s). Just pick one ...
Best practices
0 votes
0 replies
0 views
is it possible to build a restful service using grpc?
For REST-style gRPC, generally each resource type becomes a service, then then HTTP verbs are gRPC methods within the service. That's a pretty common approach when using tools like grpc-gateway, which ...
Tooling
0 votes
0 replies
0 views
Service selling platform
Have you got a clear list of the high-level requirements, and preferably some/all of the detailed requirements, and a sense of the long-term roadmap / end goal? If not then don't dive into the code ...
Tooling
1 vote
0 replies
0 views
Service selling platform
Just start going. Doing a project with actual real-world users is going to throw way more curveballs at you than a tutorial ever could, and that's honestly the best way to learn. I’ve been building in ...
Tooling
0 votes
0 replies
0 views
Service selling platform
Just... start. Starting a project is the hardest step sometimes, but if you don't start, you won't finish it. Perhaps design the UI first, so you know how users are gonna interact with the service. Or ...
0 votes
Curl command line encoding of query parameters for an HTTP PUT
Since December 2022, the proper solution is to use --url-query: curl -X PUT http://example.com/resource/1 --url-query "param1=value 1" --url-query "param2=value2" This parameter ...
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
This is clearly an agent. Why is it still not banned?
2 votes
Accepted
Rust Validator on Double Option Fields
Funny workaround - some derive macros that have special handling for certain types often determine that syntactically (i.e. by tokens only) - so you can use a type alias to thwart it: use chrono::{...
Advice
0 votes
0 replies
0 views
Design billing system microservices communication
In addition, when I used to do billing, it was a simple call service judgment at the beginning, but I think it would be better to use the interceptor at the gateway layer to be more flexible
Advice
0 votes
0 replies
0 views
Design billing system microservices communication
I think the problem is that a service needs to provide data for a page and another service, but you don't know if it should be combined into the same API. I think it should be separated, because the ...
Advice
0 votes
0 replies
0 views
What is an efficient way to aggregate paginated REST API responses in .NET without loading all pages sequentially?
What do you do with the list once you have retrieved all the pages?
Best practices
0 votes
0 replies
0 views
Best API documentation tool for a multi-service architecture (Swagger/OpenAPI vs Redoc vs Postman)?
Thanks for the detailed explanation — that makes a lot of sense.
Advice
0 votes
0 replies
0 views
What is an efficient way to aggregate paginated REST API responses in .NET without loading all pages sequentially?
What are the goals? Is memory usage a problem with the current solution? Changing to an IAsyncEnumerable is easy enough to do, but is mostly beneficial if you can process the items as as a "...
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Currently i've updated the Answer which is extensively modified, which is in my style, the code and the word selections are my own only just a bit reference from the previous and formatting from the ...
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Your post looks like it was 100% AI-generated (or, at a minimum, barely modified).
Advice
0 votes
0 replies
0 views
What is an efficient way to aggregate paginated REST API responses in .NET without loading all pages sequentially?
There is no specific pattern I'm aware of. Just fetch the pages in parallel. IAsyncEnumerable won't help you if you simply want all pages ASAP.
Advice
3 votes
0 replies
0 views
What is an efficient way to aggregate paginated REST API responses in .NET without loading all pages sequentially?
Yes, the common pattern in .NET is to expose paginated APIs as an IAsyncEnumerable<T> so results can be streamed instead of buffering everything into a List<T> first, because you don’t ...
Best practices
0 votes
0 replies
0 views
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Sorry, for this and i'm not a agent/bot, i'm also a programmer since 6 years and my motive is not to get likes/fame by posting AI generated content in here. And Ban is a huge word, but it's your right ...
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Sorry joshua, it's my mistake and i understood that, i'll correct it from now on.
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Sorry fildor, my oversight i missed that, and i'm not generating the whole content using generative AI, i use them for the research purpose and since, the "overwrites" things is because i ...
Best practices
0 votes
0 replies
0 views
How to do a proper error handling in typescript?
Neverthrow has utilities like fromPromise and fromThrowable to adapt rejecting/throwing code into Results. Here's what it might look like to leverage those: export const fetchUserProfiles = ( id: ...
Best practices
0 votes
0 replies
0 views
Best API documentation tool for a multi-service architecture (Swagger/OpenAPI vs Redoc vs Postman)?
My main experiences here have been with OpenAPI and also GraphQL, which is somewhat adjacent in this space. I think there are two useful documentation patterns here. You probably have some sort of API ...
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Member since 2 days. First answer. Probably an agent/bot. Ban this clanker.
Best practices
4 votes
0 replies
0 views
How to load multiple API responses in one object
AI-generated content is not allowed.
Best practices
2 votes
0 replies
0 views
How to load multiple API responses in one object
"overwrites the variable on every loop" - there is no loop in the original code. You need to review what ChatGPT gives you.
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Can I wrap this in a while loop with a new url while result.hasmore is true and and the new json lines to the result or is there a better way to do that? If, as you indicate, a single API request/...
Best practices
0 votes
0 replies
0 views
How to load multiple API responses in one object
Have you tried wrapping it in a loop and checking result.HasMore? This depends heavily on the implementation of the API, and we know nothing about that. You'll need to provide more information about ...
Best practices
3 votes
0 replies
0 views
How to load multiple API responses in one object
Any reason why you are not using HttpClient, here? Mind you, Microsoft writes this: Caution WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete, and you shouldn't use them for new ...
Tooling
0 votes
0 replies
0 views
XBOX API: Getting GS token from XSTS token
so the issue was in using wrong client_id. of course I can use client_id of my own application, which can not get rights using GS tokens, so switching to official xBox web app client_id fixed the ...
1 vote
nSwag Client: Is there a better/easier approach to affect PropertyNameCaseInsensitive?
Set the ExposeJsonSerializerSettings option to true when generating your client. This will make the serializer settings on the client public, so you can just set them after creation like this: ...
Advice
0 votes
0 replies
0 views
do layering of spring packages really matters , why cant i just use controller and entity classes in same package
thanks , apparently we use packages to do encapsulation in which it gives data security and provides more readability
Advice
1 vote
0 replies
0 views
do layering of spring packages really matters , why cant i just use controller and entity classes in same package
Using a single package eliminates all benefits of packaged. You’re really asking “why use packages “, which you can search for.
Best practices
2 votes
0 replies
0 views
Using @POST instead of @ GET in REST API?
There are reasons why we use different type of request for different requests. Here's why 1.Caching eg. // This response can be cached automatically — repeated calls cost nothing @GET("users"...
Best practices
2 votes
0 replies
0 views
Using @POST instead of @ GET in REST API?
The way I am reading you question is as you endpoint is having two meanings. POST= to create a user. POST= to read a user. Just this makes confusion. Would it not be easier to say POST= create and GET ...
Advice
0 votes
0 replies
0 views
do layering of spring packages really matters , why cant i just use controller and entity classes in same package
not from a company but from my prof who wants me to create a spring boot application by using layering architecture i.e the repository, entity, dto, dao, exception and etc , but normally i create ...
Advice
1 vote
0 replies
0 views
do layering of spring packages really matters , why cant i just use controller and entity classes in same package
Those two terms, layering and packages, are extremely generic and not entirely related. Please ask the person who gave you the task what they mean. They are your best source for application ...
0 votes
REST API PATCH without request body
Late to the party, but I didn't see any answer citing actual documentation or standards... First off, an easy place to start is the Mozilla docs if you ever have a question like this, which state that ...
Best practices
0 votes
0 replies
0 views
What response should I return when my get response is empty
What response should I return when my get response is empty Rules first: you should return a 200 when your resource (the thing identified by your universal resource identifier) includes the current ...
Advice
0 votes
0 replies
0 views
Design billing system microservices communication
Post updated. But if I don't have a API calls to get data between microservices the alternative will be to have a shared database which is also not good?
Advice
0 votes
0 replies
0 views
Design billing system microservices communication
Please clarify the meaning of public API and private API. But in general, service 1 should provide an API to get all required data for whatever serivce 2 is doing. In other words, avoid chatty ...
Best practices
1 vote
0 replies
0 views
What response should I return when my get response is empty
If the semantic expectation is that either there is or is not a message then that JSON certainly looks reasonable to me. The envelope of { "message": something } reasonably conveys the ...
Best practices
0 votes
0 replies
0 views
What response should I return when my get response is empty
Thank you for your answer. The endpoint returns the latest message with a date of validity after the today's date. So it returns exactly 0 or 1 message and returning 0 is totally normal. Would you ...
Best practices
0 votes
0 replies
0 views
What response should I return when my get response is empty
This may additionally depend on the nature of the resource being requested. When making the request to the server, consider intuitively what question the client is asking of the server. For example, ...
0 votes
Getting error "The required field Extension is missing from the input structure." when trying to update a report datasource using SSRS Rest API
What worked for me is using "DataSourceType": "SQL" within the payload. The below example is for updating the data source for a report to an existing shared data source. [ { &...
0 votes
In the Xero Journal entity, can the metadata or fields of Journal Lines be edited?
Generally speaking the journals themselves never get modified. When a transaction is edited in Xero the following will occur: A new journal is posted to reverse the original one. A second new ...
1 vote
Accepted
JSON text not showing when switching from plumber to plumber2 api package
Two workarounds: #* @async or a manual backgrounder such as mirai::mirai() or callr::r(). These all work because the background R process does not inherit the sink() from the calling process. @async I ...
Tooling
0 votes
0 replies
0 views
Are there any APIs, tools, or libraries that allow autofilling job applications on external websites (e.g. LinkedIn)?
*"Hey, really interesting question! For LinkedIn and Indeed, there aren’t official APIs that let you programmatically submit job applications due to privacy and security restrictions. Most ...
Tooling
0 votes
0 replies
0 views
Are there any APIs, tools, or libraries that allow autofilling job applications on external websites (e.g. LinkedIn)?
Just a note: I've seen some attempts to introduce a standard for resumes. Not job applications, but resumes. As far as I know, nothing like that is used. Every job-related site has its own rules, and ...
Advice
0 votes
0 replies
0 views
How to send an array of chat messages to Google Gemini API instead of a single message?
import { GoogleGenerativeAI } from "@google/generative-ai"; const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY); const model = genAI.getGenerativeModel({ model: "gemini-1....
Top 50 recent answers are included
Related Tags
rest × 94464java × 20292
json × 9295
spring × 7376
c# × 6297
javascript × 6029
web-services × 6013
php × 5485
spring-boot × 4940
python × 4378
http × 4295
node.js × 3874
jersey × 3435
android × 3013
wcf × 2792
django × 2588
angularjs × 2531
spring-mvc × 2508
jax-rs × 2239
post × 1859
authentication × 1718
asp.net-web-api × 1628
angular × 1594
curl × 1535
express × 1517