bash command to replace a part of a string with an environment variable

I have a configuration file abc.config which looks like the following, made up of key–value pairs: <add key=”Server.HostName” value=”local_host” /> <add key=”Server.Tcp.Port” value=”8080″ /> <add key=”Server.IPAddress” value=”xx.xx.xx.xx” /> I need a bash script that will read the entire line 1 and replace just “local_host” with an environment variable, MSYSTEM, which will be passed at run…

Details

How to send JSON inside JSON in POST

I am trying to send the following data via a POST HTTP request to an API: { “client_interface”:{ “source_address”:source, “destination_address”:destn, “message”:encrypted_msg, “business_event_url”:settings.Message_CallbackURL }, “server_interface”:{ “message_id”:msg_id } } The API is responding with the following error: { “Meta”:{ “Requestid”:12301343169471000 }, “Error”:{ “Message”:”Request body contains badly-formed JSON (at position 51)”, “Param”:”” } } CODE: apiUrl := “http://example.com”…

Details