Questions tagged [http-parameters]
48 questions
201
votes
4 answers
Design RESTful query API with a long list of query parameters
I need to design a RESTful query API, that returns a set of objects based on a few filters. The usual HTTP method for this is GET. The only problem is, it can have at least a dozen filters, and if we pass all of them as query parameters, the URL can…

missionE46
- 2,362
- 4
- 19
- 18
50
votes
4 answers
Go: Get path parameters from http.Request
I'm developing a REST API with Go, but I don't know how can I do the path mappings and retrieve the path parameters from them.
I want something like this:
func main() {
http.HandleFunc("/provisions/:id", Provisions) //<-- How can I map "id"…

Héctor
- 24,444
- 35
- 132
- 243
30
votes
2 answers
What is the difference between HTTP parameters and HTTP headers?
I read this question but it didn't answer my question.
To me Headers and Parameters are both dictionaries with the difference that headers is [String : String] while Parameters is [String : AnyObject]? and so if your parameters are also Strings…

mfaani
- 33,269
- 19
- 164
- 293
13
votes
1 answer
Angular 5 HttpParams not being set
I have thins very simple function:
createParams(paramsArray, withToken: boolean): HttpParams {
let params = new HttpParams();
let currentUser = JSON.parse(localStorage.getItem('currentUser'));
params.set('access_token',…

Marc Rasmussen
- 19,771
- 79
- 203
- 364
8
votes
4 answers
How to create HttpParams using object for HTTP request on Angular 4.3 using HttpClient
I have exactly angular version 4.3.2 and I cannot update because of dependencies. So for now I stick to this version. I have object with dynamic params (there can be other keys and values inside):
let query = {
param1: 1,
param2: 'a'
}
and…

makkasi
- 6,328
- 4
- 45
- 60
6
votes
1 answer
Underscores vs dashes in HTTP parameter names
I'm familiar with the convention of using hyphens to separate words in URL paths. What about parameter names, such as within a
is that better or my-special-field? I've seen Google use…

at.
- 50,922
- 104
- 292
- 461
4
votes
1 answer
Conditionally adding parameters using HttpParams and FromObject and using a variable for the key name
Is there a way to conditionally add a parameter using HttpParams and fromObject? I tried adding the conditional parameter after instantiating the HttpParams but that didn't work:
const params = new HttpParams({
fromObject : {
requiredParam:…

Reid
- 661
- 1
- 8
- 25
3
votes
1 answer
Error in Angular with HTTPparams 422 (Unprocessable Entity) and FastAPI
I have this url in backend and need pass c1 like a parameter, c1 is only an example,
this method enable or disable an user and give back an "ok"
http://127.0.0.1:8000/admin/enable_disable_account?name=c1
the value is taken from a button

Cristoff
- 149
- 6
3
votes
1 answer
HTTP GET Parameters not getting constructed by Angular 7.2 on IE 11
I use HttpParams in an HTTP get request of my Angular 7.2.0 application. After I building the project using "ng build --extract-css --aot" command, run the application and log the HttpParams value on the console, I can see the parameter value on the…

Kushan Randima
- 2,174
- 5
- 31
- 58
2
votes
1 answer
How to delete muliple httpparams in angular
I'm adding custom params for API's for some use case which is not require to send it BE and I want to delete them before sending to BE.
Url: https://www.dummy.com?reload=true
params: req.params.delete('reload')
Deleting 1 param (reload) working…

Arun M
- 133
- 1
- 11
2
votes
2 answers
Not able to pass parameter in POST url angular
Hi I am trying to pass parameter in POST method url in angular service to construct a URL to fetch some data from an API but when I am calling it on component file I am getting error response.
Where am I doing wrong ?
Example I need this type of url…

Optimist Rohit
- 428
- 6
- 24
2
votes
2 answers
Error in console but displays in browser
I have a problem in my angular app that says ERROR TypeError: Cannot read property 'name' of undefined but the projects.name is displaying. How can i get rid of the error in the console.log. The data contains an object.
ngOnInit() {
…
user8743396
2
votes
1 answer
Changing ParameterAware to HttpParametersAware
I'm upgrading my project from Struts 2.3.1 to 2.5.12.
Since ParametersAware is deprecated in 2.5.12. I want to change ParametersAware to HttpParametersAware.
But setParameter() method is entirely different in both.
setParameters(HttpParameters…

Dhruv Singh
- 2,185
- 2
- 11
- 17
2
votes
2 answers
I want to download a pdf file which is stored in the folder which is in WebContent of project
This is my struts.xml file.
fileInputStream
application/pdf
…

Dipti Kadu
- 39
- 5
2
votes
2 answers
API Response filecontent is Empty on Lucee server
When i call the canadaPost api in Coldfusion server that is giving the expected response. But when i Use the same call in Lucee server, It throws the message fail. The response header is "Oracle-iPlanet-Web-Server/7.0" for both servers. But the…

Sathish Chelladurai
- 670
- 1
- 8
- 23