2,322 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
1
answer
78
views
How to design a payment acquirer API wrapper (E-Rede, Cielo, or CGNet) abstracting transaction and tokenization routes?
I’m working on a project that will consume the API of a payment acquirer — for example, E-Rede, Cielo, or CGNet — depending on the environment or client configuration.
These acquirer APIs typically ...
0
votes
1
answer
23
views
Allowing a filter query in a PUT endpoint that updates a set
I'm designing a REST API that provides an integration layer to an underlying system I have no control over.
Without going in to detail, in this system, there are products with default prices. A custom ...
-1
votes
3
answers
68
views
What is the correct HTTP status code when the authenticated user’s record is missing in the database (e.g., /user-info endpoint)? [duplicate]
I’m designing a RESTful API endpoint like this:
resource function get user-info(http:RequestContext ctx)
returns database:UserInfo|http:InternalServerError|http:NotFound {
authorization:...
-1
votes
2
answers
50
views
Docker: is not providing a default to ARG really "bad"?
Docker docs say that this is "bad":
ARG TAG
FROM busybox:${TAG}
Their rationale:
An ARG used in an image reference should be valid when no build arguments are used. An image build should ...
2
votes
2
answers
123
views
Why can I not efficiently move the strings when using std::istream_iterator<std::string>?
#include <fstream>
#include <string>
#include <vector>
int main() {
auto fin = std::ifstream("tmp.txt");
auto pos = std::istream_iterator<std::string>(fin);...
0
votes
1
answer
67
views
REST API design with OneToMany relationship with Spring and JPA [closed]
Let's say I have two entities
public class Container {
UUID id;
String name;
@OneToMany
List<Element> elements
}
and
public class Element {
UUID id;
...
5
votes
2
answers
175
views
What is the rationale behind container types in std defining their own swap function even if their move-semantics have been correctly implemented?
Below is the most common implementation of std::swap:
template<typename T>
void std::swap(T& a, T& b) {
auto tmp = std::move(a);
a = std::move(b);
b = std::move(...
6
votes
1
answer
207
views
Why is std::function_ref(F*) not constexpr, while other ctors are all constexpr?
At the cppref page of std::function_ref, I found an inconsistency issue:
The copy constructor is defined as:
std::function_ref(std::function_ref const&) = default;
while the copy assignment ...
2
votes
1
answer
115
views
Why do we keep a redundant ctor in std::copyable_function?
According to the C++ docs, std::copyable_function has two overloaded ctors as follows:
template<class T, class... CArgs>
explicit copyable_function(std::in_place_type_t<T>,
CArgs&&...
3
votes
1
answer
133
views
Why fstream read and write functions expect char* and not unsigned char*?
The spec says the following for creating an object using an existing storage - [intro.object#3]:
If a complete object is created ([expr.new]) in storage associated with another object e of type "...
0
votes
0
answers
83
views
Missing data when calling an API
I am doing some work involving a dataset that I call via API every day. This gives a large JSON file of transactions. We're talking 40k plus entries a day with each having 500 parameters. ...
-3
votes
1
answer
114
views
Trying to query games whose first release was on a given platform via the IGDB API
I am trying to get a list of games whose first release was on a given platform. Because I've noticed that if you simply filter for games released on a platform and sort them by release dates, you get ...
0
votes
1
answer
47
views
What HTTP status code should be used when user calls bulk edit on both authorized and unauthorized records?
I'm currently developing an API endpoint for bulk-editing records based on their IDs. There is a possibility that user might try to update valid records and records for which they don't have the ...
1
vote
1
answer
155
views
Laravel Scramble generate docs for https routes not working
I have Laravel 11.x app developing on Github Codespaces. I am trying to generate the documentation using Scramble package.
Github Codespaces publish urls are using https.
I am using api_domain entry ...
0
votes
0
answers
15
views
IICS API Service Connection as Text
I have a service connection in IICS that connects to an API with SOAP (was originally a regular REST connection that worked fine). The goal is to take the payload as text and write it to a file. I get ...