Yii2 REST API update (put) when composite key

I am trying to update my model via PUT http request in Yii2 framework. Everything works fine when I have single Primary Key in my model. Problems are when I have composite primary key in table. How to update? I submit JSON: {"date_execution":"201...
more »

2017-08-24 10:08 (1) Answers

Use @PathParams with PUT REST Api

I am creating a REST service and I have the following API - @PUT @Path("/delete/{teamName}") @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) public Response delete(@PathParam("teamName")String teamName) { ...
more »

2017-08-07 08:08 (1) Answers

Put request with Axios | React, Redux

I want to make a put request with Axios and I got this inside of my action so far: export function updateSettings(item) { return dispatch => { console.log(item) return axios.put(`/locks`).then(response => { console.log(response...
more »

2017-08-06 23:08 (2) Answers

Updating a resource through REST (PUT/POST)

When updating a resource via REST, should one include in the body just the values to update, or the whole object (current values and values to update)? If a User object looks like this User (id, name, age, sex) and I want to update only his na...
more »

2017-07-20 23:07 (1) Answers

mix POST and PUT for updates in rest service

I know this is probably the gazillion'th time a thread has been started about this, but I cannot find an answer to my specific question. We have an internal discussion whether or not to use PUT for updates in our rest service. We have agreed that us...
more »

2017-05-17 15:05 (2) Answers

Laravel PUT on a unique, required filed

When I create a field I use the following validation. $this->validate($request, [ 'client_name' => 'required', 'contact_name' => 'required', 'email' => 'required|unique:clients|email', ]); Now when I try to ed...
more »

2017-05-17 12:05 (1) Answers

Add variable to URL in python for Hue lights

I know you can shorten down the length of this python api call to hue using a variable but I cant figure out the format or the proper term to find the answer in stackoverflow. I would like to learn how to hide the auth token to practice better securi...
more »

2017-04-07 06:04 (1) Answers

REST Service Type if no Data Flow is Involved?

If I have to consume a service that does not involve data flow between me and the application, what is the most appropriate call type to use? (GET vs POST vs PATCH vs PUT) for the service I am trying to invoke? The backend however will do couple of ...
more »

2017-03-20 18:03 (3) Answers

How to send a PUT request using UnityWebRequest?

How do I send a PUT request using UnityWebRequest? The PUT is being sent; Uploaded!! is being printed to the console. However, nothing is being updated. I think I'm formatting myData incorrectly. The actual URL I'm trying to send the PUT to is for...
more »

2017-03-09 06:03 (2) Answers

How to print a generic type in ada?

i am currently trying to print ("Ada.Text_IO.Put") a generic type, but this always fails with errors like that: missing argument for parameter "Item" in call to "Put" declared at a-tiinio.ads:60, instance at a-inteio.ads:18 expected type "Standard.I...
more »

2017-01-06 23:01 (2) Answers

PUT method REST API standard - ID in Body or Uri?

In terms of standard is it necessary to add the id to the put method together with the json body item that already contains an id property eg. public void Put(int id, [FromBody]SomeDto someDto) //someDto has Id property The ASP.NET api template ad...
more »

2016-11-15 18:11 (0) Answers