Created
June 7, 2017 16:38
-
-
Save BrunoDSouza/2e4e9de74a5aa0920253beadb2367a79 to your computer and use it in GitHub Desktop.
Vb Resquesting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim Url As String, | |
Dim dataJSON As String, | |
Dim returnResponse As String, | |
dataJSON = "[{ ""idGrupoNotificacao"":5," _ | |
& " ""tipoNotificacao"":1, " _ | |
& " ""idCentralNotificacaoOrigemConfiguracao"":1, " _ | |
& " ""prioridade"":2, " _ | |
& " ""idTipoPessoa"":2, " _ | |
& " ""valor"":1, " _ | |
& " ""destino"":""bruno.santos@odontosystem.com.br"", " _ | |
& " ""copiaOculta"":null, " _ | |
& " ""assunto"":""Notificação Teste"", " _ | |
& " ""mensagemTexto"":""Foi registrado na data 22/04/2017 a ocorrência de numero 99999999 que está pendente de execução."", " _ | |
& " ""usuario"":""bruno.santos"", " _ | |
& " ""idTemplate"":null, " _ | |
& " ""dataEnvio"":""2017-03-24"", " _ | |
& " ""notificacaoTemplateMetaDado"":null, " _ | |
& " ""anexo"":null " _ | |
& " }]" | |
Dim byteArray As Byte | |
'Produção' | |
'http://api-notificacao-teste.odontosystem.com.br/' | |
Dim Xmlhttp As Object | |
'Set Xmlhttp = CreateObject("Microsoft.XmlHttp")' | |
Url = "localhost:59254/api/Notificacao" | |
Xmlhttp.Open "POST", Url, False | |
Xmlhttp.setRequestHeader "Content-type", "application/json" | |
Xmlhttp.send dataJSON | |
returnResponse = Xmlhttp.responseText | |
EnviarNotificacao = returnResponse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment