Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm not sure this will fix your problem but a couple of things to note In this case don't use Environment.NewLine, your network traffic should not change if your code is running on Windows, Mac or Linux. <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html" rel="nofollow">Http 1.1</a> requires CRLF</p> <p>You are encoding the body of the post as UTF-8 yes you are not telling the server which encoding you are using. All your charecters are low bit ASCII so this should not matter but for completeness your Content type should be</p> <pre><code> httpWebRequest.ContentType = "application/json ; charset=UTF-8"; </code></pre> <p>Other then that I can not see issue with your code, it may be good to attache a transparent echoing proxy (Charles or fiddler) so you can see what your request looks like over the wire. From Calendars <a href="https://developers.google.com/google-apps/calendar/v3/reference/calendars/insert" rel="nofollow">examples</a> they are sending</p> <h2>Request</h2> <pre><code>POST https://www.googleapis.com/calendar/v3/calendars?key={YOUR_API_KEY} Content-Type: application/json Authorization: Bearer ya29.AHES6ZR3F6ByTg1eKVkjegKyWIukodK8KGSzY-ea1miGKpc X-JavaScript-User-Agent: Google APIs Explorer { "summary": "Test Calendar" } </code></pre> <h2>Response</h2> <pre><code>200 OK - Show headers - { "kind": "calendar#calendar", "etag": "\"NybCyMgjkLQM6Il-p8A5652MtaE/ldoGyKD2MdBs__AsDbQ2rHLfMpk\"", "id": "google.com_gqua79l34qk8v30bot94celnq8@group.calendar.google.com", "summary": "Test Calendar" } </code></pre> <p>Hope that helps, aware that it may not.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload