REST Api in node to send audio file along with json data
I have a REST API built using node and express. Now i need to send the following data in one http request:jSON DataOne Audio File to be playable on clientOn the client side,i have a simple audio player...
View ArticleIs there no setting for AWS API Gateway REST API to disable execute-api...
I have setup an API Gateway (v1, not v2) REST API resource using CloudFormation template. Recently I have noticed that the default execute-api endpoint is also created, which I can disable in the...
View ArticleRestOperation exchange method returning Http 406
I'm trying to hit a POST request using org.springframework.web.client.RestOperations, This will return me a bearer token.{"access_token": "<token>","expires_in": 300}I have created a POJO to map...
View ArticleWhat's the appropriate HTTP status code to return if a user tries logging in...
A similar question is posted here: What's an appropriate HTTP status code to return by a REST API service for a validation failure?The answer in the thread above states that "For instance if the URI is...
View ArticleSpring Boot Rest Controller: Return default Error JSON
Within my API I like to protect the user details endpoints, so that normal logged in users can only access their user profile. Therefor I am writing the controller:@RequestMapping(value = URL_USER...
View ArticleNeed to understand with golang rest api error handling [closed]
Newbie question related to golang REST API error handling practice or universal REST API practice ,5 minutes read ahead.I am new to golang and I am creating REST apis. I have a question regarding error...
View ArticleNode and Express: How to implement basic webhook server
I'm having a surprisingly hard time finding tutorials. I'm new to webhooks and have not used or seen them, beyond some basic descriptions of how they're supposed to work.Our use-case for this is...
View ArticleDifficulty creating a data pipeline with Fabric Datafactory using REST
I am creating a data pipeline in Fabric Data Factory using date as a parameter. However, the system presents the following error:enter image description hereAnd I wanted to pass a date in variable...
View ArticleHow to Implement Custom Two-Factor Authentication (2FA) in My Application?...
I want to implement two-factor authentication (2FA) in my application, where the 2FA codes are stored in the database. I want 2FA to be optional and only enabled for selected users. I am not sure how...
View ArticleHow can I speed up PHP Laravel for REST API only? [closed]
I'm running Laravel 10.0 under Apache 2.4.51 with PHP 8.1 on Windows Server 2022.First of all: I like Laravel.With the tool telescope on local machine (PHP artisan serve) I've found out, that for...
View ArticleGetting 500 code from rest template integration
I want to create simple task: make integration by restTemplate with other service by REST.But I always see code 500 from this service if I use my endpoint which has the REST integration and 200 OK if I...
View ArticleHow to format and forward cyber security logs to syslog collector using...
I hope my question is not violating Stack Overflow guidelines. If it is, please let me know, and I will delete it.I am designing an application from scratch, and one of the requirements is that this...
View ArticleLogin springboot issue [closed]
@Beanpublic SecurityFilterChain filterChain(HttpSecurity httpSecurity) { httpSecurity.csrf().disable() .authorizeHttpRequests() .requestMatchers("/home/public") .permitAll() .anyRequest()...
View ArticleJDBI How can I dynamically create a WHERE clause while preventing SQL Injection?
I want to dynamically filter a JDBI query.The a list of parameters is passed from the UI via REST e.g.http://localhost/things?foo=bar&baz=tazhttp://localhost/things?foo=buzWhich is (clumsily) built...
View ArticleRest API best practice when dealing with duplicate resources
Let's consider an API for some kind of tchat application and that can provide 2 kinds of resources : Room and User.A Room has 2 properties : users and admins. Both contain some instances of User.A same...
View ArticleI want to obtain abbreviated names for all Azure regions to create resources...
I need to create the some resources in Azure via code,but due to some regions are long in length I am unable to fit the region names in it.So I need an API to get the shorten forms of Azure regions.I...
View ArticleHow to receive JSON Messages in POST body in a JAX-RS Restful web service in...
I'm trying to develop a REST service using Apache-CXF, on top of JAX-RS. For starters, I have a method called test that receives a String message and int value. I want the clients to be able to pass...
View ArticleHow to transform PageRequest object to query string?
I'm writing an RESTful API which consumes another RESTful Data API, and I'm using Spring Data.The client side send the page request using query params...
View ArticleIs it better to have one POST endpoint and be called multiple times or two...
Let's say we're creating a message. Some users can only send a message to one other user; meanwhile others have the possibility to send a message to one or more other users.What would be better for...
View ArticleMapping API to class, Large api only want to display certain feilds
enter image description hereI am trying to create an app that takes in information from a third party API stock detail. I created a pojo and tried to map the properties from the api call to the class...
View Article