CORS - localhost as allowed origin in production
Occasionally when troubleshooting bugs in production, it would be convenient to be able to hit our production REST server from my local dev environment. But i'm concerned that adding localhost to...
View ArticleUser authentication in mobile
How do all these mobile apps login users? I did a lot of research and read tutorials but I can't find a definitive answer...I created an API for my Codeigniter web app using Phil Sturgeon's REST...
View ArticleSharepoint 2019 Rest API - Upload file to Rich Text field
I am trying to upload a file to a rich text field on a sharepoint list using the REST API. In other words, trying to mimic the behaviour of the 'Upload File' option on the Insert tab of the ribbon when...
View ArticleProtocol Buffer vs Json - when to choose one over the other?
Can anyone explain when to use protocol buffer instead of JSON (and vice versa) for a microservices architecture? Both for synchronous and asynchronous communication.
View ArticleIs there GitHub API to obtain the selected text from a diff hunk on which the...
So I know how to fetch the Pull Request comments and reviews and review comments using GitHub API - it is all documented.What is NOT documented is how can I obtain the selection associated with the...
View Articlecancel or stop a SSE endpoint connection
func handleUnknownEventPath(w http.ResponseWriter) { w.WriteHeader(http.StatusMethodNotAllowed) fmt.Fprintln(w, "Unknown method") w.(http.Flusher).Flush()}immediately after calling this method return...
View ArticleService Layer and Presentation Layer responsibility in REST architecture...
I'm developing a web API using Spring Boot and am confused about where to handle security concern. Martin Fowler in Patterns of Enterprise App Architecture suggests that"The presentation logic...
View ArticleHow to Get All Endpoints List After Startup, Spring Boot
I have a rest service written with spring boot. I want to get all endpoints after start up. How can i achieve that? Purpose of this, i want to save all endpoints to a db after start up (if they are not...
View ArticleHow to easy implement 'REST API query language' with Querydsl and Spring Data...
How to easy implement a kind of 'REST API query language' with Spring Data to filter the entities?For example, for the following Person entity:@Data@Entitypublic class Person { @Id @GeneratedValue...
View ArticleHTTP POST specific method with if-condition
public class User{ public int Uid { get; set; } public string? Name { get; set; } public virtual ICollection<UserDetails> Details { get; set; } = new List<UserDetails>();}public class...
View Articleforum software with a simple RESTful API support
I'm searching for a forum software which offers REST like API. It should be able to respond to simple calls like retrieve-post, add-new-post etc. and return the result set in JSON or XML format.Those...
View ArticleDoes checking updated_at field helps in caching?
I participated in technical interview with mobile developer (flutter). I asked about caching products (in ecommerce project). He says a strategy that initially he fetches all products (let's say we...
View ArticleReact Native Dropdown State Not Updating Visually Despite Logging Correct State
I'm working with a React Native dropdown where selecting an item updates the state as expected, but the UI doesn’t visually reflect the new state immediately. When I log the state in the onChange...
View ArticleHow to handle asynchronous requests to rest APIs in an iOS app
Let's say I want to use the rest API of some service, Twitbookr, to get a user's profile information. So I get the user to log in via my app and I get the credentials needed to make the call.After this...
View ArticleWhy my API do not recognize mi Http consults? ConsoleApp [closed]
I have the task to create console app using ApiRest. I'm working on .net 6.The thing is that my api's are not working, the app work with txt file, not with sql or that stuffs, the services are correct,...
View ArticleWhat pagination method is better for rest api's (page, size) or (limit, offset)
I searched many stack overflow answers,articles and could't get an concrete idea about this and that is why i'm asking this question,References : 10 Best Practices for Better RESTful APII am just...
View ArticleDeleting a Pinterest pin via Pinterest API in Objective-C
Apparently the Pinterest iOS SDK does not have a direct command to execute this function. How would one use the generic Pinterest API Endpoint DELETE for achieving this in Objective-C?I was trying to...
View ArticleConsume a REST API in codeigniter controller
I have create a REST API and want to consume my own created API in codeigniter controller.My created REST APIcontroller(example.php) class Example extends REST_Controller { public function...
View ArticleVite React application backend can't access localhost:3000 server
I'm building a react application using Vite, and for the backend database I'm using MySQL but not with directly connection, I'm using Prisma to deal with my DB, and I'm using SRC architecture with...
View ArticleHow do I use StreamedRequest in Dart http library to upload a file?
I want to upload a file via a non-multipart/form-data request like this:POST http://127.0.0.1/uploadCache-Control: no-cache< /path/to/file/in/disk(I tested and it successfully uploaded a file from...
View Article