Skip to main content

New answers tagged

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 ...
rmhunter's user avatar
  • 581
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 ...
Eric Anderson's user avatar
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 ...
ADyson's user avatar
  • 63.1k
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 ...
Jensen's user avatar
  • 1
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 ...
JoBe's user avatar
  • 1
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 ...
bfontaine's user avatar
  • 21.6k
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?
Good Night Nerd Pride's user avatar
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::{...
kmdreko's user avatar
  • 66.1k
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
hhh yu's user avatar
  • 1
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 ...
hhh yu's user avatar
  • 1
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?
Magnus's user avatar
  • 47.5k
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.
user9344654's user avatar
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 "...
JonasH's user avatar
  • 39.4k
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 ...
Kurama Seige's user avatar
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).
EJoshuaS - Stand with Ukraine's user avatar
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.
Good Night Nerd Pride's user avatar
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 ...
Anayo Samson Oleru's user avatar
Best practices
0 votes
0 replies
0 views

How to do a proper error handling in typescript?

This is looks so much better, thank you
Roso's user avatar
  • 1
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 ...
Kurama Seige's user avatar
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.
Kurama Seige's user avatar
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 ...
Kurama Seige's user avatar
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: ...
Matt Kantor's user avatar
  • 3,451
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 ...
David Maze's user avatar
  • 166k
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.
Good Night Nerd Pride's user avatar
Best practices
4 votes
0 replies
0 views

How to load multiple API responses in one object

AI-generated content is not allowed.
EJoshuaS - Stand with Ukraine's user avatar
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.
Fildor's user avatar
  • 16.5k
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/...
David's user avatar
  • 221k
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 ...
Greg Burghardt's user avatar
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 ...
Fildor's user avatar
  • 16.5k
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 ...
Jiri Zaloudek's user avatar
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: ...
moly's user avatar
  • 463
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
eshwar's user avatar
  • 1
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.
Dave Newton's user avatar
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"...
Jayanta Sarkar's user avatar
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 ...
Patrik Rikama-Hinnenberg's user avatar
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 ...
eshwar's user avatar
  • 1
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 ...
Torben's user avatar
  • 3,955
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 ...
Krusty the Clown's user avatar
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 ...
VoiceOfUnreason's user avatar
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?
Peter Penzov's user avatar
  • 1,212
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 ...
Andrew S's user avatar
  • 2,861
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 ...
David's user avatar
  • 221k
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 ...
Lana James's user avatar
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, ...
David's user avatar
  • 221k
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. [ { &...
Leo's user avatar
  • 197
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 ...
Doel Jangkrik's user avatar
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 ...
r2evans's user avatar
  • 169k
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 ...
Frankie	's user avatar
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 ...
Sergey A Kryukov's user avatar
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....
AJAY KAKRAN's user avatar

Top 50 recent answers are included