Click here to Skip to main content
15,891,253 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 

9 Apr 2024 by honey the codewitch
Generate a web browsable interface to your archived TV show content
21 Aug 2023 by Pete O'Hanlon
Easy way to test HttpClient with Goldlight.HttpClientTestSupport
13 Jul 2023 by Golden Basim
Hi, I developed a Windows form application using C# & MySQL, also I know about REST API in Node.js (express) and Laravel. I know it is different languages and may be different techniques. but, I want to add this feature to my C# Windows form...
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...
13 Jun 2023 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.
17 Apr 2023 by Member 15849100
Confirm the URL Is Correct. This might sound obvious, but the 401 error code might appear if the user entered the wrong URL in the browser's address bar. ... Clear User End Issues. ... Check Authentication Credentials. ... Disable...
20 Mar 2023 by H.AL
I am building a rest API to mobile apps developers. I want them each time they call my APIs to check first if the returned status is 200 or something else. So I googled and found this link which is handling status codes of rest API asp.net: create Web API response[^] But my Rest API is already...
2 Mar 2023 by Michael Chourdakis
Quicky generate text and images
30 Jan 2023 by Bal krishna sharma
After post username and password one token generate that token I want to authrize in another method to break bearer What I have tried: #include #include "WinHttpWrapper.h" #include void PrintDictionary(const...
24 Nov 2022 by Member 15065455
I'm getting the below data from SQL view. +-------+-------+------------+------------+---------+-----------+----------------+ | ID | Name | Desc | Relation | ChildId | ChildName | ChildDesc |...
24 Nov 2022 by Member 15843096
Were you able to solve this problem? If yes kindly let me know how.
14 Oct 2022 by Andrew Kim 2022
here is my html code:
31 Jul 2022 by Member 15244870
I am reading 2 REST APIs using Httpclient in C#. The APIs return following employee data in JSON format: **1st API** { "status": "OK", "content": { "empid1": 89900, "empid2": 45550, ...
31 Jul 2022 by Member 12274589
Solution: 1 Make sure your both API returns as below [{ "status": "OK", "content": { "empid1": 89900, "empid2": 45550, "empid3": 22350} }] Solution : 2 Update your wrapper class property...
9 Jul 2022 by Member 13639193
1- I am building an application front/back end using Visual Studio 2022 as the back end for Image upload file and it is tested using Postman it uploads the image to the server Successfully Postman test Image 2- I am trying to call the API...
25 Jun 2022 by Gcobani Mkontwana
Hi Team I am struggling to parse a value that is not a string in my rest api call and try to first initialize it as a const name['1080p','4k']; and when try to call it during my rest api as a name its not accessing that value object and im...
19 Jun 2022 by Gcobani Mkontwana
Hi Team I have code that fetch rest api, but i usually get this annoying syntax unexpected token { "product_name": [ { ...
16 Jun 2022 by honey the codewitch
Create a clock that uses multiple Internet services to detect your weather, date and time
11 Jun 2022 by oronsultan
Hi Gyus, We have a service in IIS and we want to perform a certain check every time someone calls one of our APIs, no matter which one. To that end, we registered for the Global_AuthenticateRequest event in the Global.asax file of the service, as...
11 May 2022 by Evoluteur
Generic REST or GraphQL endpoints for CRUD and more, written in JavaScript, using Node.js, Express, and PostgreSQL
4 Apr 2022 by Member 13065765
Hi, I am basically pretty new in django and learning. I have started learning making APIs and authentications and stuffs like that. But I need some guidance. So, basically I am supposed to use some third party APIs for logging in which will...
4 Apr 2022 by Richard MacCutchan
This question is impossible to answer. You need to consult the documentation of the API(s) that you are using
3 Apr 2022 by Roman Hoffschmidt
I'm building a tool in Python for which I need to read out error codes for specific devices using the Server-Eye API. Server-Eye is our monitoring solution where all of our devices and the devices of our customers are registered. The...
30 Mar 2022 by Madhushanka Chithrananda
I need to push data via rest api which need to be used with a bearer token authentication. I have client_id, client_secret. How am I to do this using c# desktop application Headers POST /connect/token HTTP/1.1 Host:www.xxxxxx.com Content-Type:...
30 Mar 2022 by Chris Copeland
According to some solutions I've seen posted around you might need to instead use AddParameter() and provide the parameter name and value for each. So instead of: request.AddParameter("application/x-www-form-urlencoded",...
24 Mar 2022 by dk_the_developer
Step by step guide to consuming the Rest API endpoints using Python programming
20 Feb 2022 by Utku Ozan ÇANKAYA
Advantages of using a gateway and how I benefit from using it
16 Feb 2022 by Christopher Parlato
So ... I'm trying to parse out JSON into an object. It seems to work perfectly for some code, but not for others. I'm not sure what I'm doing wrong. I don't get an error, it simply does not populate. Source Code: public AlarmQuery...
16 Feb 2022 by Graeme_Grant
Check out the following article that will cover this in detail: Working with JSON in C# & VB[^]
16 Feb 2022 by Christopher Parlato
Used to Instantly parse JSON in any language | quicktype[^] to create the class, and it seems to work better. Had to tweak it some. Tryied to make a lot of extra work. namespace VaisalaReporter { public class Test { public...
15 Feb 2022 by Han Bo Sun
Tutorial to discuss the design of a moveable popup modal using AngularJS and ui-bootstrap
8 Jan 2022 by Michael Sydney Balloni
An exciting proof-of-concept that sews httplite with security components
22 Dec 2021 by EdibIsic
1.User Class with OneToMany Annotation in relation to Roles class that can be many 2.Roles Class with @ManyToOne and @JoinColumn Annotation 3.Controller class with the endpoint 4.Postman request with Json Object throws an Exception, JSON parse...
13 Dec 2021 by Member 15435238
I am working on an springboot application(Rest) and using eureka-netflix server with it. Although application is working the way it is required to work but I am getting this error in Eureka-server logs. c.n.d.s.t.d.RedirectingEurekaHttpClient ...
6 Dec 2021 by Member 15435322
Suppose I am returning data like this in rest api: { name:"Ronald", age:25, salary:1500 } But what should I use to design variable names as I want? For example: { Name: "Ronald", Age:25, Salary:1500 } How can I design that only variable...
6 Dec 2021 by Gerry Schmitz
Quote: The schema helps in a multiple way. It acts as a contract between two teams, serves as a specification, simple to read and easy to follow and you can use it for validation once your APIs are ready. JSON Schema - as a specification,...
6 Dec 2021 by Michael Sydney Balloni
Interested in easily implementing REST communications in your Windows C++ apps?
3 Dec 2021 by Member 8042700
#realJSOP Thanks for your answer. As a work around currently I am doing the ADO.NET call as you described above, but I am looking to achieve this using the REST API call rather than ADO.NET call or SOAP API call.
3 Dec 2021 by Member 8042700
I would like to get the list of catalog items for a particular windows logged in user (Domain\username) from Report Server database using the SSRS REST API call in C#.NET. Access to the reports are given using the windows Active Directory groups...
1 Dec 2021 by Richard Deeming
For "Basic" authentication, you just need to set the appropriate header, as shown in this SO thread[^]: var encoding = System.Text.Encoding.GetEncoding("ISO-8859-1"); byte[] headerBytes = encoding.GetBytes(username + ":" + password); string...
1 Dec 2021 by Member 13998042
Hi i am trying to call a external rest api which has authentication as username and password. i able to write code till how to call a authentication less api but now when i want to pass username and password i am struck. This is my code What I...
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...
17 Nov 2021 by Member 15435238
0 I want to send data from HTML form to rest controller using Javascript, but it is getting null at controller. Can anyone please help me with what mistake I am doing here? I checked using debugging that the data is reaching from HTML to...
17 Nov 2021 by Chris Copeland
I can see two areas which may need amending. The first is in your JS, you're creating an object dataObj and populating it with the form information but you're not then using it. The serializeArray() method does not create an object but creates an...
27 Oct 2021 by User 15041314
As you can see, in my service layer this method send post request like client to the server using Spring Boot WebClient framework, but I have getting a problem, which as you can see my method accept 4 params, which you see and I want to send...
16 Oct 2021 by OldSeaDog
I have a VM running SharePoint 2019 developer edition. I have created several lists and a CEWP web app copied from a SharePoint 2013 installation. The app starts but cannot find the lists installed in the same domain. I'm using jQuery REST to...
24 Sep 2021 by Jason Sultana
Create an Insomnia-First swagger page, so your API can easily be consumed by Insomnia, all in one click
13 Sep 2021 by wa.war
I understand that the API could be returning status codes like this:200 - OK400 - Bad Request500 - Internal Server ErrorHere is my code, how to handle the error from API in my controller?public ActionResult Get() { string token_access =...
13 Sep 2021 by Oscar Valdez
IRestResponse response = client.Execute(request); if (response.StatusCode == System.Net.HttpStatusCode.OK) { } else if (response.StatusCode == System.Net.HttpStatusCode.BadRequest) { } else if (response.StatusCode ==...
1 Sep 2021 by Chriz12
I want to save the response I receive when sending a request as an object. This is my code: [XmlRoot("GetStateOwnedResponse")] public class GetEmployeeResponse� { � � PropertyStatus prStatus; } public class PropertyStatus { � �...
1 Sep 2021 by Richard Deeming
You need to pass the correct namespace to the XmlRootAttribute: XmlRootAttribute Class (System.Xml.Serialization) | Microsoft Docs[^] XmlSerializer serializer = new XmlSerializer(typeof(GetEmployeeResponse), new...
23 Jul 2021 by Member 15296753
Python Code import requests url = "https://www.xyz.com/FACD/" session = requests.session() r = session.get(url, auth=("krishp","abcdef1")) print(r.statuscode) print(r.cookies) #has cookies that authenticates subsequent reqeusts r =...
23 Jul 2021 by Simon_Whale
might be a worth reading through this Call a Web API From a .NET Client (C#) - ASP.NET 4.x | Microsoft Docs[^]
22 Jul 2021 by Member 10194266
public void Put(int id,string name, [FromBody] Employee employee) { try { using (EmployeeDBContext dBContext = new EmployeeDBContext()) { var entity =...
21 Jul 2021 by tranthanhtu.vn
This post will help you to have a look at how to implement RESTful in node in a simple way.
19 Jul 2021 by Fydobas
I am creating a VB.net application which is required to use some data retrieved from an API, via a POST request. Said POST request appears to be working fine on my end (a Windows 10 machine), both via the Insomnia REST client app and my own...
19 Jul 2021 by Richard Deeming
Transport Layer Security (TLS) best practices with the .NET Framework | Microsoft Docs[^] If you're targeting .NET Framework 4.7 or later, it will use the system's enabled protocols by default. You don't need to touch the ServicePointManager. ...
13 Jul 2021 by Member 13702159
I have HTTP client: OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(55, TimeUnit.MINUTES) // connect timeout .writeTimeout(55, TimeUnit.MINUTES) // write timeout .readTimeout(55,...
11 Jul 2021 by Richard Deeming
Try: var products = await _ctx.Project .Where(p => p.Id == id) .SelectMany(p => p.Product) .OrderByDescending(p => p.Id) .Take(20) .ToListAsync();
11 Jul 2021 by Member 11298447
I have 2 classes with joint that has been created by EF5 how can I do a query to get the list of products for specific project in good old days it was simple I just needed to do this select top(20) p.Id, p.Name from Product p inner join...
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...
5 Jul 2021 by Richard Deeming
Quote: [JsonProperty("data")] public List empdata { get; set; } = new List(); According to the samples in your question, neither API returns a property called data. They both have a property called content, but it is not a list;...
15 Jun 2021 by Member 12785541
Hallo Everyone , My ViewModel(assetViewModel) always returns null and don't know why.I already tried a lot of Solution but nothing worked ,like [FromForm],[FromBody]... What I have tried: public class AssetViewModel { public int...
15 Jun 2021 by Member 14733954
Hi , You have to assign value to viewmodel after you have to return model var model = new AssetViewModel { Countries = task.Result }; return View(model); in your current model you are returning new model instead of you have to do following ...
20 May 2021 by Jarek Szczegielniak
In this article, we’ll modify our code to expose the same logic via a Rest API service.
20 Apr 2021 by Tejarat Club
I have a problem in POSTMAN parameters I want to get a token from URL. in postman parameters Body set to Raw { "UserName": "xxx", "Password": "xxx" } application/json; charset=utf-8 and Method is POST In PostMAn it returns token...
20 Apr 2021 by Richard Deeming
Quote: in postman parameters Body set to ... application/json; charset=utf-8 ... new StringContent(... "application/raw"); Your C# code is sending a content type of application/raw, which doesn't match the content type sent in your...
4 Apr 2021 by Member 15127345
I have a client-server web app using Java and JavaScript. I would like to call a path "delete" from a method deleteBook using queryParam. I've searched the Internet, but I'm not sure how to do this. The called method was supposed to delete a book...
8 Mar 2021 by Mukund M
Hi, I have to access one Rest API thorough ASP.NET c# It is working fine through POSTMAN But i am getting Internal server error while accessing thorough code Can anyone please help me? Here my code:- What I have tried: var client = new...
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[^]
21 Feb 2021 by Dev Parzival
While following this article https://medium.com/@ivan.mejia/modern-c-micro-service-implementation-rest-api-b499ffeaf898[^] I tried to clone and build the rest sdk for linux from GitHub - ivanmejiarocha/micro-service: sample micro-service in...
21 Feb 2021 by Rick York
It says, Could not find compiler set in environment variable CXX: g++-4.9. That means the EV is set to g++-4.9 but that compiler can not be found. You need to either make that compiler accessible to Cmake or set the environment variable CXX to...
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...
12 Feb 2021 by Member 10478623
I am facing the same issue with my legacy vb.net 3.5 solution. Were you ever able to get a workaround for this issue, if so please share. Thanks,
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...
31 Jan 2021 by Michael Haephrati
Possible ways to use a Proxy Server within a Windows C++ application
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...
28 Jan 2021 by RickZeeland
See answers here: c# - Custom method names in ASP.NET Web API - Stack Overflow[^]
16 Jan 2021 by joje1985
I am working a client server application, would like your feedback on the approach I have used. About application, its a client-server based application that uses traditional sockets as the communication happens real time. The application works...
4 Dec 2020 by xhon
I'm testing my Rest APIs on Postman, I don't know how to test an API with a POST method which takes an object as a parameter. Some tutorial say that I should change the type on postman but I can't see this option, my postman control panel is the...
4 Dec 2020 by F-ES Sitecore
Select the "Body" option which will reveal other options. You can select "x-www-form-urlencoded" and enter your values there, like Id: 28 Title: Harry Potter or (probably the better option) select "raw" and enter your data as json { ...
3 Dec 2020 by Richard Deeming
You are trying to pass the book details in the querystring. You need to pass it in the request body instead. https://learning.postman.com/docs/sending-requests/requests/#sending-body-data[^]
23 Nov 2020 by xhon
I created a Rest web API and now I want to call the operations exposed by the API from a Proxy. My environment is Visual Studio, C#. As the operations that I exposed in the API share a part of the URL/endpoint ("api/NameOfTheController"), I...
23 Nov 2020 by Richard Deeming
customEndpointSegment does not appear to be a standard configuration element - the only match in Google is this question. You have presumably written your own configuration section to handle this element. You will need to use that section to...
19 Nov 2020 by xhon
I'm trying to set up a RestFul service on IIS, my working environment is Visual Studio, C #. In my solution I have two separate projects, one for a REST service and the other for a WCF service, they are managed by the same Proxy; the proxy...
19 Nov 2020 by xhon
I want to implement a Rest service inside my application, which already has different layers (Business Logic Layer, Data Access Layer and Data Model which contains all my entities). I'm gonna using IIS (locally) and Visual Studio. I created a...
18 Nov 2020 by Gerry Schmitz
Write a web service by using Visual C# - C# | Microsoft Docs[^]
3 Nov 2020 by Sadegh H
Is there any documentation for it? I've found lots of tutorials for "GET", but I can't find anything for "POST" What I have tried: For example to get data from database I use these codes: add_action( 'rest_api_init', 'myfunction_name' );...
2 Nov 2020 by Member 10785772
Hello, I'm trying to learn how to create a json REST webservice and starting off with a simple example ... but can't get it to function. This is what I get when attempting to call it with a cUrl ... curl -X GET -v...
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...
6 Oct 2020 by Ansel Castro
Leveraging Protobuf and code generation tools to drive the development of microservices and REST APIs
29 Sep 2020 by Bippy_B
What sort of error are you getting? Without knowing what the error is it is somewhat hard to interpret. Is the service even starting? If the service is starting I would recommend seeing if the "help" section will display. If the service...
29 Sep 2020 by cutie1
I have written a WCF service to return a JSON response.However I coulnot get it ?Here is my code:IService.cs: [OperationContract] [WebInvoke(UriTemplate = "GetAppointments/?companyId={companyId}&appointmentDate={appointmentDate}", Method = "GET", RequestFormat =...
19 Sep 2020 by Don Kackman
An easy to use Rest client using the Dynamic Language Runtime
16 Sep 2020 by Jeremy D Richardson
Have a problem that I feel like must have been solved in some elegant ways but wanting some input. I'm using vanilla Javascript to solve this but wondering if perhaps there is a more elegant React solution or some other library. Problem: Have an...