2,212 questions
1
vote
0
answers
89
views
Why the CURL PUT request with basic AUTH via API doesn't send JSON data?
I make a PHP CURL PUT JSON request with basic AUTH via API:
$data = <<<JSON
{
"name": "John",
"age": "32",
"address": {
...
1
vote
0
answers
213
views
How to nicely solve self-referencing object update error?
In my project I have a bunch of models, that are all derived from the class 'Entity'. Simplified, this means they all have the following properties:
public Guid Id { get; set; }
public DateTime ...
-1
votes
1
answer
38
views
Axios Get does recognize the db collection balances but Put or Post or Patch does not
so I have a fullstack React App, this type of code I have data on db. collection that I can access by Axios Get, but this data is not accessible by Put to update it, Its a balance credit account that ...
1
vote
2
answers
156
views
Setting json string in http requests in Perl
Following Perl code generates an error printed below:
use strict;
use Data::Dumper;
use LWP::UserAgent;
use JSON;
my $token = 'my token';
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->...
0
votes
1
answer
456
views
PUT request gives "Request failed with status code 404" error message in nodejs, axios
MAJOR UPDATE: THAT BOOTCAMP'S API IS BROKEN. ERROR ISN'T FROM MY SIDE
What problem I had had:
Actual Problem:
I'm working on server side using axios, nodejs, following Angela-Yu's Webdev Bootcamp.
...
-2
votes
1
answer
104
views
How to solve this error on sending a PUT Request from my swift app
I got a url to which I have to send put request. these are headers which are being sent -, also the body looks like this - (the. second picture)
earlier I was having issues on Postman because in the ...
3
votes
1
answer
2k
views
use both PUT and POST methods from same API using FastAPI
I'm about to create an API using FastApi wherein I have to search for 'user_name' in db. If 'user_name' exists then I have to update the user_details. If the 'user_name' doesn't exist, then I have to ...
1
vote
0
answers
191
views
MongoDB not updating with Put request, Next.js 13
I am using Postman to test my endpoints and everything is working except for updating my documents in Mongodb, I am using PUT request and this is my code, the file path: src/app/api/users/[id]
import {...
1
vote
1
answer
34
views
How can I increase or decrease the value when put to a database Firebase RD, javascript
I have a database in Firebase with current stock. I want to be able to change it with a new value plus input2 or minus input1 new values that I put in in DOM. How can I update the stock with plus or ...
-2
votes
1
answer
63
views
What's the correct RESTful behaviour of a PUT method with an auto generated ID in URL if the resource does not exist?
I'm designing a REST API for a CRUD application. Resource ID's are UUIDs that are generated by the database on insert. So when I make a PUT, let's say something like
PUT http://host/books/{database ...
1
vote
1
answer
515
views
How do I send a PUT request with JSON body with cURL? [duplicate]
I have this code to send a PUT request:
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_PUT, true);
curl_setopt($curl, CURLOPT_BODY, json_encode($result));
curl_exec($curl);
But that doesn't ...
1
vote
1
answer
915
views
Django Ninja Update a FileField
I am trying to create a simple restful API using Django-ninja.
Here is the post method to add a new record:
@router.post('/add',
response={201: WordSchema, 401: DefaultSchema, 404: ...
0
votes
1
answer
142
views
Axios request can't access relevant method in backend
I have a problem with using Axios request to access method in backend.
Unfortunately, I have to use pre-made by others code in both backend and frontend and there is a limit to how much I can change ...
-1
votes
1
answer
39
views
SpringMVC PUT request to edit data but instead, got a new one
I'm practicing Spring/Thymeleaf and facing an issue
I create a a PUT request to edit but instead it act as POST by create a new data
Here are my codes
Controller
// imports
@Autowired
private ...
1
vote
0
answers
96
views
Locust- how to avoid conflict when multiple virtual users performing the same post or put
For write operations such as POST and PUT, is there a way to avoid conflict when multiple virtual users performing the same task? Is there a better implementation?
from locust import HttpUser, task, ...
0
votes
1
answer
134
views
Unable to Upload or Update Fields in Podio via API in Python, despite Successful Authentication
I am working on a Python script to automate file uploads and field updates to a Podio application. I am using the requests library to send HTTP requests to the Podio API.
I am able to authenticate ...
0
votes
0
answers
445
views
How to add a file to an http server
I am testing an http server, when I send a GET request to the server http://httpserver:10000/test.txt , this server replies with the content of the test.txt file.
If I want to add a file to the server,...
0
votes
0
answers
118
views
File editing Geoserver Rest Api SpringBoot
Can You help me edit the file?
First off how should it work. The {stylere} file is a path variable of course.
When I will enter http://localhost:8055/edit-style/{stylere} I get the form on the page ...
1
vote
0
answers
19
views
HTTP PUT Request being blocked by the browser [duplicate]
I have this html code:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Contato</title>
<link rel="...
0
votes
1
answer
31
views
Django ModelViewSet: passowrd not encrypted when using PUT method
I use DRF ModelViewSet for user account CRUD operations.
I have "extend" Django user model with Profile model to store complementary user's informations.
I have override create and update ...
0
votes
2
answers
1k
views
Keep getting a CORS error for put requests in Django from browser
I keep getting a CORS error when I make a put request to my Django server from my frontend application (Fetch API) but not from Postman. Here is the error:
Cross-Origin Request Blocked: The Same ...
0
votes
1
answer
82
views
Handling put requests in a React web application
I'm creating a web application with React where a user can keep track of collectable items. The React app will be connected to AWS via API Gateway, and will make requests which will be handled by ...
0
votes
2
answers
31
views
API with a PUT request in Modelviewset which has not null values
When calling a API with a PUT request, I get a message saying that the fields name and name_abbrev are mandatory:
What are way in which I can carryout put operation without supplying 'name' and '...
1
vote
1
answer
431
views
Laravel 10.9.0 update using ajax error when submiting data
I'm trying to update data by opening modal bootstrap, and got an error when PUT data from AJAX to route
this is the error 'localhost:8000/nilaiUpdates/1 419 (unknown status)
I tired to change so many ...
0
votes
0
answers
85
views
Invoke-RestMethod REST API PUT Method with If-Match Error
I am trying to use the PUT method in my REST API and in that i want to USE If-Match in header so in there i am getting Invalid that If-Match error everything is correct and all restapi and If-Match ...
1
vote
1
answer
43
views
Rows empty Error, using GridDB web API to populate data in JSON format
This question is about sending JSON payloads to a Web API Endpoint.
I am using GridDB's web API to insert data into an existing table, via the PUT call.
I am sending a JSON payload to be inserted into ...
0
votes
2
answers
548
views
laravel api put and patch method not accepting request from postman form-data
I'm creating an update api by using apiresource in laravel 8. im seing request from the postman using put and patch method but it returning empty array. is there any method by using that i can create ...
1
vote
1
answer
293
views
How to modify put method to update an array in SpringBoot App
I currently have a service that receives three parameters and performs the Update without a problem when receiving data from a front with Angular, the data that I save is from the fields of a ...
-2
votes
1
answer
68
views
<!DOCKTYPE... is not valid JSON
Simply put, i have a list on a server containing multiple tupples of data.
I have a 'check' function which updates a datapoint in the tupple from 0 to 1,
so basically it updates/edits the json from 0 ...
0
votes
2
answers
2k
views
Laravel Error- The PUT method is not supported for route comments/4/edit. Supported methods: GET, HEAD
Trying to update a comment using update function i created but when i route the comment i get the error 'The PUT method is not supported for route comments/4/edit. Supported methods: GET, HEAD.' - the ...
0
votes
2
answers
2k
views
Uploading files to Discord API thought PUT using python requests
I have a problem while trying to upload files to discord.
If I get it right, algorithm of uploading files to discord is next:
I am sending information about the file that i want to upload, discord ...
0
votes
2
answers
294
views
I want to update my DB data from user Input text field
I want to update data by Id, I have userId, name and all details, if I want to change any user details based on user Id so I'm not able to update data and I am getting values above the Text Form Field....
0
votes
0
answers
13
views
Python: getting an needs bytes not str on a Requests put [duplicate]
We use Interact as our intranet vendor. I am trying to use their API to update the review date on some of the pages. Each session requires the user to get a token and then use that token for auth on ...
1
vote
1
answer
510
views
Is there a function in SAS that can convert a day of the year to a date?
Suppose that I have a data set which contains a variable with days 1-365, representing each day of the year 2020. Is there a function that exists that can convert this day value to a date value mm/dd/...
0
votes
1
answer
2k
views
fetch presigned url to s3 by put getting forbidden 403
I'm using Amazon S3 to store images and I'm generating a pre-signed URL to upload them. When I use Python to upload the images using the pre-signed URL, it works without any issues. However, when I ...
1
vote
1
answer
408
views
Best practice to detect when a REST PUT operation receives a stale or old version of an object [closed]
I understand that in REST, a PUT operation completely updates an object/record on the server. It seems like a common issue would be a scenario like the following:
Bob makes a GET request for an ...
0
votes
1
answer
864
views
How to update id of an object through Postman
I have some dummy data in my database where an "activity" instance only contains an activityId as its attribute. Id's are strings and are manually set for now. This is just a test/dummy ...
1
vote
1
answer
1k
views
PUT file to S3 with Presigned URL and header: x-amz-checksum-sha256 return 403
We are trying to implement object integrity check for S3 PUT operations with SHA256 checksum. For multipart upload requests, this feature seems to work if we pass the SHA256 checksum in the ...
0
votes
1
answer
122
views
How to implement role based authorization to edit fields
i have got a Quarkus project where i want to implement role based authz. Lets say i have a class Product:
class Product {
String name
String description
String customerName
}
I have authorized the ...
0
votes
0
answers
40
views
Nodejs RESTful API - PUT 404 (MySQL)
I'm trying to create a RESTFul API for using Nodejs with MYSQL to create a CRUD web app.
GET and POST seem to be working fine, but when I try to implement an update with PUT,
I get a 404 not found ...
3
votes
2
answers
2k
views
Perform file upload via PUT method by HTMX
Have simple CGI/HTMX utilizing system and need to uploading images to server script via PUT method. Trying something like this, but have no luck.
<input id="new_area" type="file"...
0
votes
1
answer
16
views
Sequelize how to update records in foreign tables
I have a these 3 tables:
Hotel
Filters
HotelFilters
I can add hotels, filters and the associated HotelFilters correctly like this:
// Create and Save a new Hotel
exports.create = async (req, res) =>...
1
vote
1
answer
2k
views
Express.js PUT and DELETE methods not working
I am trying to create a simple to-do app using Node, Express, and sqlite3. I have GET and POST methods that work perfectly, but my PUT and DELETE are not accessed, instead, I'm being met with a 404 ...
-1
votes
1
answer
36
views
PUT/PATCH merhtod return Undefind and {} object , when use the with form-data in nodejs,expressJs
I'm stuck for the last two days. I have tried all the solutions for it but still, I'm getting undefined or {} object when running the method with PUT and PATCH in nodejs
Postman screen shot is here
...
0
votes
0
answers
2k
views
ESP32 "ESPAsyncWebServer" PUT Json
I have a problem with ESP32 "ESPAsyncWebServer" PUT Json. There is an error in the code. How to fix it?
JavaScript Working:
async function test() {
var val = JSON.stringify({on: ledState});...
0
votes
1
answer
308
views
Put/Post errors while trying to access it from through python. "Bad Request. The JSON payload should be inside a root property called
I am trying to post/put to Sheety via Python:
SHEETY_URL = "https://api.sheety.co/gfhgfhjfdghjgfjf/flightDeals/prices/5"
header = {
"Content-Type" : "application/json&...
0
votes
2
answers
3k
views
Is body required in PUT request? [duplicate]
I want to design my REST endpoint for enabling or disabling a user
My thought is to use PUT without body, with this URLs:
PUT /.../users/{userName}/enable
PUT /.../users/{userName}/disable
Is it ...
-3
votes
2
answers
234
views
Can I use POST instead of PUT in a NodeJS app? [closed]
What is the difference if I always use POST method to update a row in the MySQL or Cassandra database instead of PUT?
I ask this because when I did research on that I read in some other questions that ...
0
votes
2
answers
207
views
What is the best approach to pass an id and model together in PUT method?
I am writing an asp.net webAPI app, and I'm wondering: what is the best approach to pass an id and an updatedModel? Let's consider, that now I have such method:
[Authorize(Policy = "WriteAccess&...
0
votes
0
answers
461
views
How to PUT data to JSON-Server when using URL parameters?
db.json example:
{
"articles":[{"art_id":1,"cat_id":1,"article":"Communication Device","description":"Small communication device in the ...