Click here to Skip to main content
15,891,529 members
Everything / REST

REST

REST

Great Reads

by Evoluteur
Generic REST or GraphQL endpoints for CRUD and more, written in JavaScript, using Node.js, Express, and PostgreSQL
by lusgon
Uploading a file using WCF REST API and JavaScript
by Vincent Maverick Durano
This article will talk about how to implement a custom wrapper for your ASP.NET Core and Web API applications for managing exceptions, providing meaningful and consistent responses to consumers.
by Michael Chourdakis
Quicky generate text and images

Latest Articles

by honey the codewitch
Generate a web browsable interface to your archived TV show content
by Pete O'Hanlon
Easy way to test HttpClient with Goldlight.HttpClientTestSupport
by Peng Qiu
In this article, we will talk about what web security related configuration parameters help protect the transfer data in the REST API and how to configure them.
by Michael Chourdakis
Quicky generate text and images

All Articles

Sort by Updated

REST 

12 Mar 2019 by #realJSOP
You're essentially "crossing the streams", and .Net is gonna complain. Welcome to Microsoft's newest forced incompatibility infrastructure. If it were me, I would get refactor the web service to use .Net Framework instead of .net Core (it honestly shouldn't be difficault to do), and get on with...
1 Mar 2021 by #realJSOP
I googled it and this was the first result returned: Format Nested JSON Output with PATH Mode - SQL Server | Microsoft Docs[^] My search results are here: sql server nested json at DuckDuckGo[^]
1 Dec 2021 by #realJSOP
I have never had to deal with SQL reporting, but... 0) There doesn't appear to be a Rest API that provides that functionality. 1) You can use ADO.Net to submit that query to the report server. 2) I suggest changing the query to this, so you...
6 Nov 2012 by 07405
Hi.. This is my xml...
20 Nov 2012 by 07405
Hi...i am very new to javascript. how to call restful web services using javascript. function CreateXMLHttpRequest() { if (typeof XMLHttpRequest != "undefined") { //All modern browsers (IE7+, Firefox, Chrome, Safari, and Opera) uses...
22 Nov 2012 by 07405
Hi...i want to call rest services using javascript. my code isfunction CreateXMLHttpRequest() { if (typeof XMLHttpRequest != "undefined") { alert("1"); //All modern browsers (IE7+, Firefox, Chrome, Safari, and Opera) uses...
23 Nov 2012 by 07405
I have to call Rest Services using javascript. My code is:function CreateXMLHttpRequest() { if (typeof XMLHttpRequest != "undefined") { return new XMLHttpRequest(); } else if (typeof ActiveXObject != "undefined") { return new...
23 Nov 2012 by 07405
I found solution in this article:Consuming WCF REST Services Using jQuery AJAX Calls[^]
26 Nov 2012 by 07405
My code is:var userName = document.getElementById("txtSearch").value; var xhr = new XMLHttpRequest(); xhr.open("POST", "http://www.rest.net/services/abc.svc/json/GetXml", true); xhr.responseType = "text"; xhr.setRequestHeader("Content-Type", "text/xml;charset=UTF-8"); ...
2 Jul 2017 by 9000605667
I am writing one .net API for Android, Ipad apps and Web application So i am little bit confusion which is suitable for above kinds of app. So Please give me guidance which can i pick to start (i.e) Web API (or) REST. Thanks, What I have tried: So Please give me guidance which can i pick to...
10 Sep 2012 by __TR__
Similar thread here RESTful web service in ASP .NET 3.5[^]There are many articles in CP. Here are a fewImplement CRUD Operations using RESTful WCF Service and JavaScript[^]Consuming WCF REST Services Using jQuery AJAX Calls[^]Developing a REST Web Service using C# - A...
31 Jul 2012 by _Amy
Hi,Refer this[^] for the similar discussion.
26 Mar 2014 by _jarvis
Krunal,Try this : var result = data.GetEmployeeJSONResult;var id = result.Id;var name = result.Name;var salary = result.Salary;Or if you want to directly alert try this : alert(data.GetEmployeeJSONResult.Id);You need to understand how JSON works. Comparing the JSON data...
26 Mar 2014 by _jarvis
sam,You can use Json.Net from JNK or either of JavaScriptSerializer and DataContractJsonSerializer from MS directly. But Json.Net is pretty easy to use so would recommend to go with that!
28 Jul 2016 by _ProgProg_
Dear,i have a problem of sending video to IOS devices only as it doesn't show as a streaming videos.it works fine on android.the whole issue is as follows:i have a web-service that retrieves videos from database as byte array.these byte array is appended to...
13 Aug 2012 by A_sachin
hi,I am trying to create json enabled wcf services with entity framework 4.0.when i return the response in XML format using [WebInvoke(Method = "GET", UriTemplate = "/getStudents", BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Xml, ResponseFormat =...
14 Aug 2012 by A_sachin
hi i got the solution for my problem...i just need to make some changes in web.config file for my endpoint behavior...and now it is working well...Thnks for your consideration..and in order to serialize the list() into Json i used JavaScriptSerializer public string...
10 Jul 2021 by aakar
We are calling a Rest API URL via the HttpWebRequest / HttpWebResponse method using IDs that are already stored in a database table. We am currently using a for each loop to iterate through each of the IDs fetched in a DataTable and then making a...
7 Apr 2012 by aamir sajjad
Please provide your feedback on my solution against following requirements.Requirement (similar to):1.a let say that authentication Token is made out of the Email and date and is encrypted1.b authentication Token is send back to the client through header1.c authentication Token...
25 Apr 2012 by aamir sajjad
how can I use given URL for email varfication in ASP.NET WEB API?var Email="test@test.com"var key="122";"http://localhost:50740/api/Users/VerifyEmail/" + Email + "/" + keywhen i enter into web browser, debug it [HttpGet]public HttpResponseMessage VerifyEmail(string...
27 May 2012 by aamir sajjad
How to implement the custom authorization and exception handling attribute in the ASP.NET Web API.
31 Jul 2020 by Abbathsin
I have been using Net Remoting for so long that I'm trying migrate to WCF because I need to now pass all this data to a web through json. The reason is that the libraries I use are licensed and these are for machine communication (Interop and...
5 Oct 2014 by Abhijit Ghosh (Subho)
Creating a Issue in Jira using Rest API and Microsoft XML Core Services (MSXML)
19 Oct 2014 by Abhijit Ghosh (Subho)
This is an alternative for "Creating a Issue in Jira using Rest API". This is an upgraded version as it contains a way of sending attachments with the issue. This version doesn't use MSXML as it is not recommended by Microsoft.
30 Aug 2012 by Abhinav S
You can browse the WCF service and the pass in an xml to save it without a client.You can also use the WCF test client tool - http://msdn.microsoft.com/en-us/library/bb552364.aspx[^].
2 Oct 2019 by Abhinav S
This article provides guidelines that can help build a good service in as little as 10 days.
20 May 2014 by ADK Serenity
Given the broad nature of your question(s), I think you may need to look into a few aspects of WCF services:InstancingThe instancing behavior (set by using the ServiceBehaviorAttribute.InstanceContextMode property) controls how the InstanceContext is created in response to incoming...
20 Dec 2011 by adnama
I have a good web service running on my pc and an application on android just to call it and it is suppose to return a string. it works fine on the browser on my pc, but on the android it is returning null. I tried 2 examples and both returning null, and they are not interracting with the web...
24 Apr 2015 by adriancs
use webclienthttps://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.110).aspx[^]http://www.dotnetperls.com/webclient[^]http://stackoverflow.com/questions/5401501/how-to-post-data-to-specific-url-using-webclient-in-c-sharp[^]
6 Oct 2016 by Aftab Ahmed Sajid
The simplest way to return json objects to client using struts 1
22 Sep 2015 by Afzaal Ahmad Zeeshan
Depends on your server's hardware, it wouldn't collapse. It is not a wormhole, but a machine. It will simply get slow, think of it like having a water pipe with capacity to allow 5 litres of water and you try to get 20 litres of it? Will it collapse? No, it will provide you with 20 litres of...
21 Sep 2016 by Afzaal Ahmad Zeeshan
Quote:I was searching difference between WebApi and WEF REST and in almost every artical I found that WebApi is lightweighted than WCF REST but none of them told "why".I will tell you the "why" part of their posts and the increased interest in this question is motivating me to write an article...
18 Jun 2017 by Afzaal Ahmad Zeeshan
This is a very broad question and can never be answered in a QA, simply or even easily. But I will try to give you a very short glimpse of the answer, then you can continue to learn it all by yourself — because, in the end it is you, who has to learn. Quote: What is a good way to learn about...
10 Mar 2019 by Afzaal Ahmad Zeeshan
As others have already mentioned clearly, this is not about your app, rather about the protocol. If you are, Quote: updating database using POST HTTP Verb? You are violating the HTTP protocol and the definitions for these verbs. Same is the case for other cases in your question. In a properly...
14 Apr 2017 by AhmedYehiaK
Hi everyone, I have a web API which communicate with multiple external services (SOAP, REST, etc) all requests to external services are in parallel (60~70 request created at moment) i need to now what is the best practice to log all requests and responses. I need to now the best method in...
10 Sep 2012 by aidin Tajadod
Hi Guys,I have an ASP.Net 3.5 application (not MVC). I am mostly using Ajax with Generic Handlers (ashx ) to handle ASync requests. Now I need to add some other features to the application and I am wondering if I can use REST with JSON in my application.I google it but unfortunately it...
18 Sep 2012 by aidin Tajadod
Hi Guys,I have a WCF rest which is working fine in my development machine (Visual Studio web server). But I can not make it work in my QA server which is windows XP with IIS 5.1 (SSL enabled). ("Bad Request" or "not found")If I go to the IIS and set the mapping ".*" to "aspnet_isapi.dll",...
19 Sep 2012 by aidin Tajadod
OK, I think there is no way to do that! But at least I have found why I could not make a call directly to the .svc/... for the other peaoples who may have the same problem:I had my service in a folder (WCF) inside my asp.net site which is a normal directory and not a "virtual directory"....
22 Jan 2015 by Ajay Bhalerao1
Hi,I am developing restfull web api's using asp.ne mvc 4.How to get the child resource from parent resource.I have a author class with fieldsclass Author{ int id; string name; Book book;}class Book{ string bookId; string bookName; ...
1 Mar 2016 by Akhil Mittal
In this article I’ll explain how to write your own custom routes using Attribute Routing.
1 Mar 2016 by Akhil Mittal
This article will explain how to make WebAPI secure using Basic Authentication and Token based authorization.
1 Apr 2011 by Albin Abel
As that article uses custom handlers you may need to map those handlers. Because IIS or ASP.Net processes may not understand such file extension requests.Go through this link http://support.microsoft.com/kb/308001[^]Refer to deploy the handler section. Note this method differ for...
16 Jul 2013 by Aleksandar.S
Hello everyone,I'm trying to make an IP camera proxy/relay. To clear what that is, a camera can hold up only up to 15 connections. Since this should be used with a larger number of users, my idea is to make a REST web service with Web API and serve an MJPEG stream to every user. The source...
27 Apr 2020 by Alen Toma
Communicate with REST API using interface and expression instead of URL
17 May 2015 by Alessandro Arnoldi
// Read response data into buffer char[] buffer = new char[(int)responseEntity.getContentLength()]; InputStream stream = responseEntity.getContent(); InputStreamReader reader = new InputStreamReader(stream); reader.read(buffer); stream.close(); ...
25 Jan 2017 by Alibaba Cloud
This article briefly introduces how to use Zipkin to perform service analysis on Spring Cloud applications. In practical application, Zipkin can be used in combination with stress testing tools to analyze the availability and performance of systems under high stress.
2 Feb 2018 by alper ar
Thank you Richard it is a good point that i missed. I looked eventlog then added the tags below at the web.config and it works. Thank you
14 Dec 2016 by Alvin Bunk
REST Easy With Symfony
17 Aug 2014 by Ameer Vikram
How can I create a RESTFull WCF Service with POST Method which is called by Ajax from ASP.NET or PhoneGap
17 Aug 2014 by Ameer Vikram
I have Created a WCF service with POST Method. I want to call that function from ASP.NET / PhoneGap using Ajax. But I can't. It shows error.
21 Oct 2016 by Amgad Fahmi
An experimental tiny lib (3kb) to load any JS library from jsdelivr.com dynamically based on the lib name. Specific version also supported
1 Nov 2020 by AmitabhaGhosh123
I am trying to perform CRUD operation for rest api. Currently I am performing the update operation for a form on button click. Problem : In Postman When I hit the api by passing api key in headers section and required parameters in body...
19 Mar 2013 by amitt0488
Hello Guys,I want to develop a web application using webGL library. But, to make it run on Internet Explorer, we need IEWebGL plugin.That's Ok. But, the main issue is that I want to integrate this application into a Company's CRM system (which is Microsoft Dynamics CRM). For that, the...
16 Apr 2013 by amitt0488
I have a created a WCF service application, through which i am accesing function of a C++ DLL. The code is given below :namespace zielhabbegService{ [DataContract] public class zielhabbegServiceClass : IzielhabbegServiceClass { [DllImport("FANselect.dll",...
3 Jun 2013 by amitt0488
I have a created a webService, whose output string (in JSON) is given below :"[{\"CALC_ALTITUDE\":213,\u000a\"ZA_MAINS_SUPPLY\":\"3~ 400V 50Hz\"}]"When i set this string in a TextBox, the output comes like this :[{ "CALC_ALTITUDE":213, "ZA_MAINS_SUPPLY":"3~ 400V...
24 Aug 2017 by Amlan Sengupta
Hi All, I'm facing a peculiar problem while accessing user details using Yammer REST API. I'm using the following endpoint to access the user details https://api.yammer.com/api/v1/oauth/tokens.json?user_id=USERNAME&consumer_key=CONSUMERTOKEN The problem is when the user name does not...
12 Apr 2013 by Amogh Natu
This article mainly explains what webhooks are, how they can be created and used and also a sample example showing the use of webhooks.
13 Jul 2023 by Andre Oosthuizen
It is going to be difficult to find an all-in-one solution online for your requirements. You need to first draw up your mind-map requirements, break them down into little objects then start with creating each object accordingly. There are many...
25 Jun 2016 by Andreas Mertens
I am attempting to call my own Web API call to get a an object that I define as a Data Contract. I am using Swagger to decorate the call, and in the client I am generating the client with AutoREST. However while my calls that pass in a [DataContract] object works fine, the return values are...
25 Jun 2016 by Andreas Mertens
Figured it out. It seems that there are additional parameters on the SwaggerResponse attributes that I was not aware of (due to a lack of any clear documentation on the Swashbuckle package). I found these by using the ObjectBrowser and found that there is an additional set of optional...
14 Oct 2022 by Andrew Kim 2022
here is my html code:
6 Aug 2011 by AndrewAlb
What is the proper way in a REST architecture to post something that is hierarchical in nature?Let me explain.Let's say I have a question and answer application.Users posts questions, and each question can have many responses.When fetching a question, with ID of 1, I would do:GET:...
17 Sep 2011 by AndrewAlb
Come on...really? No REST fanatic wants to rip me a new one for my misuse of REST?nobody has any opinion at all?its wide open for anybody to just tear me apart...
13 Nov 2017 by Andrey Rodin
Automation of OPTIONS response in REST-service
25 Sep 2017 by Andy Lanng
Hi, I have a load of images stored in zip files. I am trying to return the image from my Web Api 2 application. Can anyone suggest a clever way to return the stream directly from the zip and then dispose of it (code below)? I'm considering scrapping the 'zip' plan and storing the images as...
15 Oct 2018 by Andy Lanng
QQ: If 90% of requests get a (202) Accepted but the odd one requires some more information, what httpstatuscode I return to signal this? I.E.: request: POST (host/sale/endpoint) Sales data response: 202 POST (host/sale/endpoint) Sales data response: ?? We need to know the collection...
13 Jun 2017 by Aneets
I am looking for the Advice with a project that is in the planing stages.I need to Build a JSON REST API so we can integrate an internal system that we are developing with our ERP(Netsuite). I program in VB.net and am looking for advice on what framework to use and were i can find examples...
13 Jun 2017 by Aneets
Managed to get Service Stack to work. Thanks all for your sugestions.
12 Feb 2021 by Aneets
Hi, Am really struggling with Posting Json to a Secure Rest API in a VB.net Compact 3.5 App. Below is the first Piece of code I tried and I get a error that 'Could not establish secure channel for SSL/TLS' Imports Newtonsoft.Json Imports System.Net Imports System.IO Imports System.Text Public...
18 Sep 2014 by Anele Ngqandu
HiHaving issues i cant seem to hit my controller, please helpWeb.xml below.
21 Jun 2016 by Anele Ngqandu
Hi GuysI am passing id to my ActionResult, I then notice that I can change the id from the browser and move to another record and modify that record with out logging in and access it. Is there a way I can avoid that? maybe when I change that id it redirects to the login page rather?What...
14 Oct 2014 by AngelBlueSky
Hi I'm able to upload a file to Rest WCF Service along with some parameters, in this example just one.I tried to pass a Json object as parameter but is not working.So my question is:is it possible tu upload a file and at the same time an object just like I do in the following example with...
22 Jan 2020 by Ankur Ramanuj
Hello, I have one .Net core project for API and I have requirement of External and Internal API usage. In simple word I need to make API open for internal users and secured for external users. When internal user hit the endpoint it should not asked for any type of credential but if external...
29 Jul 2015 by anoopsingh.hada
If am using below code to get authentication response from service.using (var client = new HttpClient()){ client.BaseAddress = new Uri var content = new FormUrlEncodedContent(new[] { new KeyValuePair("username", _username), new KeyValuePair("password",...
6 Oct 2020 by Ansel Castro
Leveraging Protobuf and code generation tools to drive the development of microservices and REST APIs
3 Apr 2017 by Anuja Pawar Indore
Breaking down of a large project into small executable modules is Microservices.
28 Sep 2013 by Anupam5181
I am getting 400 bad request for WebMessageBodyStyle.WrappedInterfacepublic interface ITMCOtherService { /// /// Searching nearest post office and ATM machine loations /// ///
19 Mar 2013 by Anupama Agarwal
How to create custom authorization policy and return HTTPContext Identity for authorization.
28 Jan 2021 by Aravindba
Hi, I am new to REST full Api, i want to create GET method to pass one or two parameters, and return value as json format. Need to create in VB or C#. What I have tried: I try to create in C#, but url without function name, i call controller...
4 Feb 2021 by Aravindba
Hi, I have create rest api for get method and deployed in public server, when i call rest api using below code i will get error "The remote server returned an error: (403) Forbidden." Dim wc As WebClient wc = New WebClient Try Dim res As...
15 Jan 2015 by Arian Celina
Web services vs. SOA and Pretty URL vs. REST
16 Apr 2015 by Arian Celina
Implementing REST services in AngularJS using Restangular
28 Oct 2013 by arielb
Hello WCF Friends,i have a major problem.i'm trying to download files using REST WCF, but it appears that, for example, 16MB file takes me 56 seconds, but in regular download (same source - from a website we have) - it takes 8 seconds.In the client side, i'm reading the chunks like...
11 Aug 2011 by Arthanarieaswaran Shanmugaraj
Yes, We can have work around for optional parameter.See the below code, if you call http:///get - It will call the GetAllertion methodhttp:///get/12 - It will call the GetAPerson method with parameter alue 12So these URL act as optional paramter //Get...
23 Mar 2012 by Arthanarieaswaran Shanmugaraj
Explains the basics of REST services and create & consume RESTful service in ASP.NET
11 Apr 2018 by Arthi Rangaswamy
I have created a issue with issue type "test" using the Jira Rest API. Now I have to add the test details(test step, test data, expected result). could you please help on how to add the test details(test step, test data, expected result) to a issue with issue type "test" What I have tried: I...
11 Sep 2013 by aryan_isml29
I have two solutions one is RestWCFService and another is ConsumeRestServicethe code of RestWCFServiceEmployee.csusing System;using System.Collections.Generic;using System.Linq;using System.Web;namespace RestWCFService{ public class Employee { public...
1 Jan 2018 by Asaduzzaman Dipu
You can try this way /_api/web/lists/GetByTitle('TestReference')/items?$expand=LookupColumn&$select=Title,LookupColumn/Title&$filter=substringof('A',LookupColumn/Title)
18 Sep 2013 by AshishMishrag
I am trying to put data on my rest api as!-->$.ajax({ url: 'http://cloud........LoginCredentials ', type: 'Put', contentType: "application/json; charset=utf-8", dataType: 'json', crossDomain: true, ...
9 May 2013 by ashok yede201
Hello,I have created one RESTful wcf srevice.I wanna to know best Unit testing tool to test Rest Wcf Service.I was trying to use NUnit test tool, but I thought it is not best tool to test REST wcf Service as I was getting many errrors.Please tell meThanks in advance.
9 May 2013 by ashok yede201
I wanna to write test cases in NUnit test project for REstful WCF service.How can I use NUnit test to test RestFul wcf services?Thanks in advance....
22 May 2013 by ashok yede201
Hello,I have created PDF from RDLC report in consol application.same thing I wanna to create PDF file from RDLC report in RestWcf Service.I will create one restful wcf service and I should be able to call that service, and that service should created one PDF file by using RDLC report...
22 May 2013 by ashok yede201
I have created one NUnit project and I have test case which directly calls to the rest service and we can test that response with expected response.
17 Feb 2016 by Ashokyede
I have a REST service running on server.I have Chrome Postman to access that service with Basic Authentication, and I can access that service with this Post man.But, now I want to create a UI to show received data from REST in AngularJS.How I can call this REST service by using...
17 Feb 2016 by Ashokyede
Thanks Peter for your help.$http.defaults.headers.common.Authorization = 'Basic dfdstdfvsae3fewrew54ser4w;;This worked for me..
6 Nov 2012 by ashp.net
i am using a web service created in java in anothe rmachine and consuming it using rest client in C#.net while doing that i am getting an error saying "the remote server returned an error:unsupported media type 415"...please fix my problem... i am using a console application and the code is...
4 Apr 2011 by Asif Ishaq
Hi,How can I identify a web service supports rest behavior or not? I have only URL of the service which i get from user at run time. And if a service supports Rest then would that service expose any descriptor(e.g WADL) through which I can get method name, method parameters and method type...
19 Apr 2011 by Asif Ishaq
Hi,What is the standard way to pass parameters to REST services? Is it parameterName = value? In this way how the complex object would be passed? I am using c# WebRequest class for calling Rest service. Target service could be implemented in any language so the solution I have to...
19 Mar 2015 by ASJ_SA
Public Function ()as List(of object) implements End FunctionHope this helpsInterface must also return the same List