by
285 9
0
4
1,335
14
Top 1% !
Famous
Specified
OpenSource
Popularity: 16142nd place
Created
Modified Nov 14, 2016
No tags for this snippet yet.
Languagevala
LicenseMIT_X11

Csharp consumindo Rest + lendo JSON

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1543298/Csharp-consumindo-Rest---lendo-JSON?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Net; using System.IO; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace ExemploChatBot { public partial class Chat : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void enviar_Click(object sender, EventArgs e) { string txt_campo_texto = campo_texto.Text; var url = "http://128.0.0.1:5000/site?id=2542&texto_digitado="+ txt_campo_texto + ""; var syncClient = new WebClient(); var content = syncClient.DownloadString(url); dynamic registro = JObject.Parse(content); campo_texto.Text = registro.pergunta; } } }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus