{"action":"created","issue":{"url":"https://api.github.com/repos/VBA-tools/VBA-Web/issues/125","labels_url":"https://api.github.com/repos/VBA-tools/VBA-Web/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/VBA-tools/VBA-Web/issues/125/comments","events_url":"https://api.github.com/repos/VBA-tools/VBA-Web/issues/125/events","html_url":"https://github.com/VBA-tools/VBA-Web/issues/125","id":88394559,"number":125,"title":"POST fails on Mac but succeeds on Windows","user":{"login":"mmustala","id":830686,"avatar_url":"https://avatars.githubusercontent.com/u/830686?v=3","gravatar_id":"","url":"https://api.github.com/users/mmustala","html_url":"https://github.com/mmustala","followers_url":"https://api.github.com/users/mmustala/followers","following_url":"https://api.github.com/users/mmustala/following{/other_user}","gists_url":"https://api.github.com/users/mmustala/gists{/gist_id}","starred_url":"https://api.github.com/users/mmustala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmustala/subscriptions","organizations_url":"https://api.github.com/users/mmustala/orgs","repos_url":"https://api.github.com/users/mmustala/repos","events_url":"https://api.github.com/users/mmustala/events{/privacy}","received_events_url":"https://api.github.com/users/mmustala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-15T11:21:44Z","updated_at":"2015-06-18T14:09:17Z","closed_at":null,"body":"Hi,\r\n\r\nI'm using VBA-Web to post sheet in csv and images as base64 encoded strings to my web server. The server responds with an empty JSON with status 200. When using the macro in Windows Excel 2003 it works ok but on Mac Excel 2011 I get an error\r\n\r\n    Run-time error '-2147210493 (80042b03)': \r\n    Method 'Execute' of object 'WebClient' failed\r\n\r\nThe debug is highlighting the row with \r\n\r\n    Set response = expClient.Execute(expRequest)\r\n\r\nThe macro code looks like this\r\n\r\n```\r\nSub test()\r\n\r\n    Dim token As String\r\n    Dim i As Long\r\n    Dim requestBody As String\r\n    Dim imageString As String\r\n    \r\n    Application.StatusBar = \"Sending csv data...\"\r\n    \r\n    Dim expClient As New WebClient\r\n    expClient.BaseUrl = ApiBaseUrl()\r\n    Dim expRequest As New WebRequest\r\n    expRequest.Resource = \"/excel_data\"\r\n    expRequest.Method = WebMethod.HttpPost\r\n    expRequest.RequestFormat = WebFormat.PlainText\r\n    expRequest.ResponseFormat = WebFormat.json\r\n    expRequest.AddHeader \"X-Api-Access-Token\", Range(\"L1\")\r\n\r\n    requestBody = Join2d(Worksheets(\"Sheet1\").Range(\"A1:I37\").Value, vbCrLf, \",\")\r\n    expRequest.Body = requestBody\r\n    \r\n    Dim response As WebResponse\r\n    Set response = expClient.Execute(expRequest)\r\n    If response.StatusCode = WebStatusCode.ok Then\r\n        token = response.Data(\"token\")\r\n        i = 1\r\n        For Each img In Worksheets(\"Sheet1\").Shapes\r\n            Application.StatusBar = \"Sending image \" & i\r\n            \r\n            imageString = readImageToString(img)\r\n            requestBody = Encode64(imageString)\r\n            Set expRequest = New WebRequest\r\n            expRequest.Resource = \"/image_data\"\r\n            expRequest.Method = WebMethod.HttpPost\r\n            expRequest.RequestFormat = WebFormat.PlainText\r\n            expRequest.ResponseFormat = WebFormat.json\r\n            expRequest.AddHeader \"X-Api-Access-Token\", Range(\"L1\")\r\n            expRequest.AddHeader \"X-Token\", token\r\n            expRequest.AddHeader \"X-Image-Name\", \"test.jpg\"\r\n            expRequest.Body = requestBody\r\n            \r\n            Set response = expClient.Execute(expRequest)\r\n            If response.StatusCode <> WebStatusCode.ok Then\r\n                MsgBox (\"Sending data error:\" & vbCrLf & response.Content)\r\n                Exit Sub\r\n            End If\r\n\r\n            i = i + 1\r\n        Next img\r\n        \r\n    Else\r\n        MsgBox (\"Sending data error:\" & vbCrLf & response.Content)\r\n        Exit Sub\r\n   End If\r\n\r\nEnd Sub\r\n```\r\n\r\nDo you have ideas about why this is happening? Any workarounds?"},"comment":{"url":"https://api.github.com/repos/VBA-tools/VBA-Web/issues/comments/113168039","html_url":"https://github.com/VBA-tools/VBA-Web/issues/125#issuecomment-113168039","issue_url":"https://api.github.com/repos/VBA-tools/VBA-Web/issues/125","id":113168039,"user":{"login":"timhall","id":1211148,"avatar_url":"https://avatars.githubusercontent.com/u/1211148?v=3","gravatar_id":"","url":"https://api.github.com/users/timhall","html_url":"https://github.com/timhall","followers_url":"https://api.github.com/users/timhall/followers","following_url":"https://api.github.com/users/timhall/following{/other_user}","gists_url":"https://api.github.com/users/timhall/gists{/gist_id}","starred_url":"https://api.github.com/users/timhall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timhall/subscriptions","organizations_url":"https://api.github.com/users/timhall/orgs","repos_url":"https://api.github.com/users/timhall/repos","events_url":"https://api.github.com/users/timhall/events{/privacy}","received_events_url":"https://api.github.com/users/timhall/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T14:09:17Z","updated_at":"2015-06-18T14:09:17Z","body":"Thanks for including all of the debugging. Strange, so it includes both 100 and 200 in the same response? (I've never worked with status code 100 before, but didn't think that was normal) I'll look into a way to handle this case."}}