put

R - write() a file to a SAMBA share

笑着哭i 提交于 2019-12-08 12:41:33
I have a file loaded in R that I want to move to a samba share It is something like write(some-file, file = "|smbclient -U user //ip password") It connects to the samba but then (I think) the output is "executed" in the smb: \> and I don't want the file to be executed, I don't know how to pass the file to the destination with a put function inside smbclient. Edit: This is not the same problem as the first post. The first post is solved and answered by me. The point there was connecting to samba. Now I'm already connected to it but the write() function doesn't make a file, instead it pipes out

Recurly PUT request working but returning server error

徘徊边缘 提交于 2019-12-08 10:40:29
问题 I am implementing the the Recurly API (http://docs.recurly.com/api) in C#/.NET and so far it has gone really well despite the lack of .NET support for V2. I have managed to implement the majority of the API successfully but am encountering an issue with the use of PUT requests for the modification or updating of user accounts. My GET and POST requests work perfectly and I receive httpStatusCode 200 for account creations and receive appropriate XMLs for any data I 'GET'. However, when I

Amazon S3 iOS SDK Photo Upload Error SOMETIMES - SignatureDoesNotMatch

空扰寡人 提交于 2019-12-08 07:10:58
问题 So my iPhone app successfully uploads photos to Amazon S3. I used the same code as the S3Uploader example project with the latest (ver 1.6.0) Amazon AWS SDK for iOS. The problem is intermittently I'll get the SignatureDoesNotMatch error (The request signature we calculated does not match the signature you provided. Check your key and signing method.). There's no pattern to it. Currently my app is working around this error by doing a certain amount of retries on the delegate call

E11000 duplicate key error when doing PUT for modifiable resource with Spring Data Rest

痴心易碎 提交于 2019-12-08 01:20:18
问题 Update: According to this question, the author of Spring data rest say, the @Version properties will become ETags in response header. And there are two options for update: Just PUT without an If-Match header -- enforces overriding whatever is present on the server as the aggregate gets loaded, incoming data mapped onto it and it written back. You still get optimistic locking applied if another client changed the aggregate in the meantime (although an admittedly very short window). If that's

How to retrieve the JSON message body in JAX-RS REST method?

回眸只為那壹抹淺笑 提交于 2019-12-07 23:53:04
问题 I have the following JSON that will be passed as part of a HTTP request, in the message body. { "names": [ { "id":"<number>", "name":"<string>", "type":"<string>", } ] } My current REST handler is below. I am able to get the Id and `Version that is passed in as path params, but I am not sure how to retrieve the contents on the message body ? @PUT @Path("/Id/{Id}/version/{version}/addPerson") public Response addPerson(@PathParam("Id") String Id, @PathParam("version") String version) { if

How to Consume JSON as input in PUT and POST method of REST webservice in java

前提是你 提交于 2019-12-07 17:33:49
问题 I am trying to create a REST web service using JAX-RS. In that, I have PUT method or POST method which consumes the json as mediatype in the REST web service. Can I know how to call these methods from the client side. How do we pass that json as input from client side to those PUT and POST method and how would we consume the json format in the PUT or POST method from server side. If we want to consume xml, then we are using JAXBElement. For consuming json, how to do that ? 回答1: This may help

Unable to test HTTP PUT-based file upload via Squid Proxy

对着背影说爱祢 提交于 2019-12-07 13:35:26
问题 I can upload a file to my Apache web server using Curl just fine: echo "[$(date)] file contents." | curl -T - http://WEB-SERVER/upload/sample.put However, if I put a Squid proxy server in between, then I am not able to: echo "[$(date)] file contents." | curl -x http://SQUID-PROXY:3128 -T - http://WEB-SERVER/upload/sample.put Curl reports the following error: Note: This error response was in HTML format, but I've removed the tags for ease of reading. ERROR: The requested URL could not be

How to work with ASP.Net WebApi overloaded methods?

烈酒焚心 提交于 2019-12-07 04:15:24
问题 I have a situation where I have two methods one accepts a poco and another list of poco in my controller class: [AcceptVerbs("PUT")] [ActionName("Item")] public void SaveItem([FromBody] Item item) { m_controller.SaveItem(item); } [AcceptVerbs("PUT")] [ActionName("Items")] public void SaveItems([FromBody] List<Item> items) { m_controller.SaveItem(items); } my routing table looks something like: routes.MapHttpRoute("Item Route", "api/item/{orderId}", new { controller = "MyOrder", action = "Item

Is it okay to use an HTTP DELETE to deactivate a record?

*爱你&永不变心* 提交于 2019-12-06 19:54:33
问题 I'm building a RESTful API command to deactivate a user record. Is it kosher to use DELETE to do this or should this be a PUT, since the record is being updated to "deactivated" status? Or is it just a matter of taste? 回答1: The semantics of DELETE means that you are actually getting rid of the object. What you're doing here seems like a modification of the object's state. In this case a PUT or PATCH would be more appropriate. It is better to stick with the semantics of uniform interface that

Put request with Axios | React, Redux

倾然丶 夕夏残阳落幕 提交于 2019-12-06 14:30:48
问题 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) }) } } When I console.log item I can see all of things I've typed in my input boxes inside of that object, but later I get 404. I know that I have that URI. Does anyone know how to troubleshoot this problem? 回答1: a put response will need an object to send with. the