put

Adding events to Davical server using Http request and DDay.iCal

点点圈 提交于 2019-12-25 16:20:52
问题 I am trying to add an event from my local database to the Davical server (in fact, this should apply to any CalDav server, as long as it is compliant with the CalDav protocol)... From what I could read here, I can send a PUT request to add events contained in a VCALENDAR collection... So here is what I try to do: try { // Create the HttpWebRequest object HttpWebRequest Request = (HttpWebRequest)HttpWebRequest.Create("http://my_caldav_srv/davical.php/user/mycalendar"); // Add the network

Can't update user with PUT Request in Angular 2

女生的网名这么多〃 提交于 2019-12-25 08:37:28
问题 I am building an Angular 2 app and I have created an API that is online and that lets me update a user that has name, email and about fields. I tested it with Rest Easy and I could update any user but when I try to update it from Angular 2 nothing changes in database, what I am trying to do is the following: updateUser(user: User) { let url = 'http://example.com/api/user/update' + user.user_id; console.log(JSON.stringify(user)); // this prints out in console correctly let headers = new

httpClient -> HTTP/1.1 500 Internal Server Error

本小妞迷上赌 提交于 2019-12-25 01:55:47
问题 I'm allways getting this error ( HTTP/1.1 500 Internal Server Error ) when I'm trying to do a PUT/POST in my REST client application, using HttpClient. Do you have any idea of what kind of error it can be? Isn't it a error in the code? It tells that is in teh Server.. If you need some of my code, just ask for it! Thanks This is the message I receive in the server logs: [#|2013-03-15T09:34:32.508+0000|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID

SPARQL INSERT not working with PUT method. why?

久未见 提交于 2019-12-24 16:35:26
问题 I am trying to create a new object with PUT method and to add some of my own prefixes with SPARQL query. But, the object is being created without the added prefixes. It works with POST and PATCH though. Why and is there alternative way for SPARQL to use with PUT method and add using user-defined prefixes? PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX indexing: <http://fedora.info/definitions/v4/indexing#> DELETE { } INSERT { <>

error 411 Length Required c++, libcurl PUT request

无人久伴 提交于 2019-12-24 05:39:08
问题 Even though I set in header Content-Lenght I'm getting 411 error. I'm trying to send PUT request. struct curl_slist *headers = NULL; curl = curl_easy_init(); std::string paramiters = "<data_file><archive>false</archive><data_type_id>0a7a184a-dcc6-452a-bcd3-52dbd2a83ea2</data_type_id><data_file_name>backwardstep.stt</data_file_name><description>connectionfile</description><job_id>264cf297-3bc7-42e1-8edc-5e2948ee62b6</job_id></data_file>"; if (curl) { headers = curl_slist_append(headers,

Using HTTP Request of Jmeter to put records into Amazon Kinesis

被刻印的时光 ゝ 提交于 2019-12-24 03:25:51
问题 I use jmeter to create HTTP request for my webservice REST. Now i want to send this request to Amazon kinesis using PutRecords method but i don't know hot to create the request, in particular how to set Headers fields for Signing and Authenticating in kinesis. Has someone used Rest request? thanks 回答1: As per PutRecords API reference sample request should look as POST / HTTP/1.1 Host: kinesis.<region>.<domain> x-amz-Date: <Date> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>,

jQuery ajax drops integer on url

大城市里の小女人 提交于 2019-12-24 01:29:14
问题 I am using this data... // Pulled from the button that was hit var method = document.activeElement.getAttribute('method').toUpperCase(); var url = document.activeElement.getAttribute('url'); Both buttons (methods) have the same url defined... '/user/1' This is my jQuery AJAX call... $.ajax({ type: method, url: url', /* I even hard coded this to make sure what it had to use */ contentType: "application/json; charset=utf-8", data: $(form).serializeArray(), error: function (xhr, status) { alert

Android HttpURLConnection PUT to Amazon AWS S3 403 error

北慕城南 提交于 2019-12-23 13:24:09
问题 Uploading a file to Amazon S3 using presigned URL which has Signature, Expiration and AccessKey, using the following code I'm able to upload the file using normal java code but same code in Android gives me 403 error. Presigned URL is generate using Amazon SDK I have read http://developer.android.com/reference/java/net/HttpURLConnection.html and http://android-developers.blogspot.com/2011/09/androids-http-clients.html but not able to figure out what header param should i use, I guess in

RSpec test PUT update action

好久不见. 提交于 2019-12-23 13:22:44
问题 I am trying to write some RSpec tests to test my app, but I've stumbled on several problems that I can't find any solution. 1) I am trying to test the update action. Here is my code: it "email is a new one" do put :update, id: @user, user: FactoryGirl.attributes_for(:user, :email=>"a@b.c") @user.reload @user.email.should == "a@b.c" puts @user.email end Here is the UsersController update action: def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[

Simple “PUT” file upload with AFNetworking

北城余情 提交于 2019-12-23 04:54:28
问题 I suppose it is pretty simple but I couldn't figure out how to do it. I want to upload a file to using a PUT request to a webservice using AFNetworking library. This is the curl command I used to test the service mac:~ user$ curl --verbose -T image.jpeg http://server.org:8001/social/test.jpg * About to connect() to server.org port 8001 (#0) * Trying 123.45.123.123... * connected * Connected to server.org (123.45.123.123) port 8001 (#0) > PUT /social/test.jpg HTTP/1.1 > User-Agent: curl/7.24.0