TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Zoltan Kerenyi
NA
72
13.6k
parsing HTTP response
May 13 2020 12:16 AM
Hi,
I'd like to parse out the OFF from the http response that look like this in a browser:
in the Browser's Inspector:
In WireShark:
And in code debugger:
The problem is that the delimiter is a paragraph sign.
I really need to know the current relay state, this is the latest code, I've been experimenting with:
public
string
GetRelayState(
byte
relay)
{
string
api = $
"http://{Ip}/api2.cgi?p={Password}"
;
var request = (HttpWebRequest)WebRequest.Create(api);
request.AllowAutoRedirect =
false
;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader s =
new
StreamReader(stream);
return
s.ReadToEnd().Split(
'\u00a7'
)[2];
}
Could you please help me out?
Reply
Answers (
1
)
Split PDF FIle for corrupt PDF
Unable to access the shared mail box through Graph API