Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert web request to HTTPwebRequest

Posted on 2013-01-05
3
Medium Priority
?
427 Views
Last Modified: 2013-01-23
Hi,

I have a web request that I need to convert to .net the web request is currently  made via java script and is working successfully the following  is taken from chrome developers tools with the database id changed do you now how to convert it.

Request URL:https://api.tiggzi.com/rest/1/db/collections/jobs?where=%7B%22account%22%3A%22systems%22%2C+%22driver%22%3A%22JOE%22%2C+%22complete%22%3A%22false%22%7D/
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
DNT:1
Host:api.tiggzi.com
Origin:http://project.tiggzi.com
Referer:http://project.tiggzi.com/view/7cf54281-5407-XXXXXXX-783958ec1f0e/joblist.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11
X-Tiggzi-Database-Id:57786655XXXXXXXX
Query String Parametersview URL encoded
where:{"account":"systems", "driver":"JOE", "complete":"false"}
Response Headersview source
Access-Control-Allow-Origin:http://project.tiggzi.com
Connection:keep-alive
Content-Type:application/json
Date:Sat, 05 Jan 2013 15:16:42 GMT
Server:nginx
Set-Cookie:JSESSIONID=gKHfYmM8UlgomPJfgpiIreIB.undefined; Path=/; Secure
Transfer-Encoding:chunked
0
Comment
Question by:JoeBo747
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Assisted Solution

by:Easwaran Paramasivam
Easwaran Paramasivam earned 1000 total points
ID: 38747258
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 1000 total points
ID: 38748401
since request method is GET u need to concatenate the parameters into the url string using
 '?' and '&' chars.

follow this post here:
http://stackoverflow.com/questions/3279888/how-to-add-parameters-into-a-webrequest                

make sure to pass the right request info to the suggested function and concatenate the parameters as explained.

so u ended up having the following url:

:https://api.tiggzi.com/rest/1/db/collections/jobs?account=systems&driver=JOE&complete=false

for the DB id you can add it at the end of the url in the same manner.
0
 
LVL 1

Author Closing Comment

by:JoeBo747
ID: 38811286
Sorry it has taken a while to get back to this, both your replies help in getting the correct method so only fair to share the points.
Thanks,
Joe
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question