This error happens because you got another error in the request, do not forget to check status.

But anyway. As you need to call https, you should first configure SSL Configuration manually through management portal. You have to fill only Name field, any name on your choice.

Or the same but programmatically.

 ClassMethod GetSSLConfiguration(Server As %String) As %String
{
  new $namespace
  znspace "%SYS"
  do {
    quit:##class(Security.SSLConfigs).Exists(Server)

    set tSC=##class(Security.SSLConfigs).Create(Server)
    $$$ThrowOnError(tSC)
  while 0
  
  quit Server
}

And full working example 

 Class User.Google Extends %RegisteredObject
{

/// Google API key
Parameter KEY = "Put Your Google Maps API Key here";

ClassMethod GetDistanceMatrix(Origins As %String, Destinations As %String, Output Status As %Status) As %DynamicObject
{
  set params("origins")=Origins
  set params("destinations")=Destinations
  set Status=..CallGoogleMapsAPI("/maps/api/distancematrix/json", .params, .data) 
  quit data
}

ClassMethod CallGoogleMapsAPI(Url As %String, ByRef Params, Output Data) As %Status
{
  set Data={}
  set ht=##class(%Net.HttpRequest).%New()
  set ht.Server="maps.googleapis.com"
  set ht.Https=1
  set ht.SSLConfiguration=..GetSSLConfiguration(ht.Server)
  
  set param=""
  for {
    set param=$order(Params(param),1,value)
    quit:param=""
    do ht.SetParam(param, value)
  }
  do ht.SetParam("key", ..#KEY)
  
  set sc=ht.Get(Url)
  if $$$ISERR(sc) quit sc
  
  set Data={}.%FromJSON(ht.HttpResponse.Data)

  quit $$$OK
}

ClassMethod GetSSLConfiguration(Server As %String) As %String
{
  new $namespace
  znspace "%SYS"
  do {
    quit:##class(Security.SSLConfigs).Exists(Server)

    set tSC=##class(Security.SSLConfigs).Create(Server)
    $$$ThrowOnError(tSC)
  while 0
  
  quit Server
}

}

And call in terminal

USER>set data=##class(Google).GetDistanceMatrix("BRISTOL", "LONDON", .sc)

USER>w data.%ToJSON()
{"destination_addresses":["London, UK"],"origin_addresses":["Bristol, UK"],"rows":[{"elements":[{"distance":{"text":"190 km","value":189925},"duration":{"text":"2 hours 23 mins","value":8582},"status":"OK"}]}],"status":"OK"}

My example should work on versions 2016.2 and later, tested on 2017.2

Could you repeat my commands?

USER>do $system.OBJ.Compile("Test.*","cdk-u")

Compilation started on 01/29/2018 08:42:30 with qualifiers 'cdk-u'
Compiling 2 classes, using 2 worker jobs
Compiling class Test.Book
Compiling class Test.Chapter
Compiling table Test.Book
Compiling table Test.Chapter
Compiling routine Test.Book.1
Compiling routine Test.Chapter.1
Compilation finished successfully in 0.691s.

USER>set b = ##class(Test.Book).%New()

USER>w b.Chapters
7@%Library.RelationshipObject

If you got almost the same, your Insert should work

In first you used wrong slashes for windows and macOS. For windows should be "\" and for macOS "/"

For macOS you should use Unix style, where did you find this macOS style with colons? I have never seen such way.

And do not forget, that you can use methods NormalizeFilename and NormalizeDirectory in the class %File. These methods can help you to fix platform differences.

In the web world, you don't have access to files on the client's machine, only if a user will give you this particular file. So, if a user manually downloaded your file, changed it. He should interact with your application again, to select and upload it back.

But, there is another way, how to achieve what you want. If I understood you correctly, you need a way to edit MSWord files stored in your application. In this case, instead of the download file, edit and upload back, we have now two ways.

  • WebDAV: it is an extension for HTTP for editing files through the network. You can make a special link which will be opened by MS Word, and after save, it will save this file back to the server, without storing it locally.
  • Office Online: it is almost the same office but which is working online installed on company`s server. It obviously has less functionality than the desktop version, but in most cases, it could be enough. And if online version does not support something in your file it will offer to open it through WebDAV, if you as a developer support it. As an example how it works, you can go to OneDrive, upload some office file, and edit it right there. Almost the same version available to install on your server.

In my previous company, I realized both ways, it was quite tricky but it still works.

date in Cache stored in $horolog, which is just number of days from 01/01/1841. So to get the last day of the month you need the date for the first day of next month minus 1.

USER>set y=2018 for m=1:1:12 set d=$zdh(m_"/01/"_y) w !,$zd(d-1, 4)

31/12/2017
31/01/2018
28/02/2018
31/03/2018
30/04/2018
31/05/2018
30/06/2018
31/07/2018
31/08/2018
30/09/2018
31/10/2018
30/11/2018

In HTML world, we have two sides. Server and Browser. Upload means that some users far from our server can choose the file on their machines and upload it to the server through the network. The server will get full this file and only filename. You can't get file path because it is useless to you. If you would run this file in a browser and try to choose any your local file then push upload file button. You will get some information about this file, like for me.

Second parameter test flag in method Post can help you to understand what you send and what do you receive from the destination server.

 If test is 1 then instead of connecting to a remote machine it will just output what it would have send to the web server to the current device, if test is 2 then it will output the response to the current device after the Post.

s sc = httprequest.Post("/api/v0/bwxpert/visiocheck/account", 1)

should show something like

POST /api/v0/bwxpert/visiocheck/account HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; Cache;)
Host: 194.2.225.126
Accept-Encoding: gzip
Authorization: Basic X1N5c3RlbTpTWVM=
Content-Length: 2
Content-Type: application/json
 
{}

And I think in your case error in this line

d httprequest.EntityBody.Write(json)

Write method expects to see string, but I think you put some JSON object here. So, you have to change it.

d httprequest.EntityBody.Write(json.%ToJSON())

Some notice, put full address with server name and port to Post is redundant, while you already use this address for particular properties.

PS: It is not secure to publish IP to your publicly available server. As a moderator I replaced your IP to localhost, and fixed formatting.

It is very interesting and quite difficult question. Depends on how modern your application and how you build it.

The modern way to build web-application means that you use some web-frameworks such as Angular, React and so on. In this case, most of you frontend staff in Javascript/Typescript and even such pages can be already on the client side when user open your application. And it means that you can use some guardians to prevent access to some pages. But how to decide which user can have access which not. You have to ask about permissions from your server. And on server-side, you will have REST service which should AccessToken from browser to authorize all requests and return data which available by permissions for this user. REST service can even use or not session because with every request you will get information about the user from Access-Token.